-
1. Scriptlet to JSTL
<%
String temp = "Scriptlet to JSTL";
pageContext.setAttribute("temp", temp);
%>
<c:out value="${pageScope.test }" />
// or
${pageScope.test }
2. JSTL to Scriptlet
<c:set var="temp2" value="JSTL to Scriptlet" />
String temp2 = ${temp2 };
<%= temp2 %>
댓글