<%
String myVariable = "Test";
pageContext.setAttribute("myVariable", myVariable);
%>
<c:out value="myVariable"/>
2. Access JSTL variable with scriptlet
<c:set var="myVariable" value="Test"/>
<%
String myVariable = (String)pageContext.getAttribute("myVariable");
out.print(myVariable);
%>
댓글 없음:
댓글 쓰기