The following code causes an error:
<%
String resp = \"abc\";
resp = resp + test;
pageContext.setAt
Scripts are raw java embedded in the page code, and if you declare variables in your scripts, then they become local variables embedded in the page.
In contrast, JSTL works entirely with scoped attributes, either at page, request or session scope. You need to rework your scriptlet to fish test out as an attribute:
<%
String resp = "abc";
String test = pageContext.getAttribute("test");
resp = resp + test;
pageContext.setAttribute("resp", resp);
%>
If you look at the docs for , you'll see you can specify scope as page, request or session, and it defaults to page.
Better yet, don't use scriptlets at all: they make the baby jesus cry.