I can pass a variable from a JSP scriptlet to JSTL but not from JSTL to a JSP scriptlet without an error

Viewed 119557

The following code causes an error:

 <c:set var="test" value="test1"/>
 <%
   String resp = "abc";
   resp = resp + test;
   pageContext.setAttribute("resp", resp);
 %>
 <c:out value="${resp}"/>

The error says

"error a line 4: unknown symbol 'test'".

How do I pass test from the JSTL code to the JSP scriptlet?

2 Answers
Related