java - JSTL sessionScope attribute -
i need retrieve session attribute in .jspx file , following not work:
in controller set attribute follows:
request.getsession().setattribute("error", 1);
then try retrieve attribute in .jspx file:
<c:if test="${sessionscope.error eq 1}"> <p>retrieved</p> </c:if>
i not "retrieved" message. doing wrong?
if use request.setatribute , don't use sessionscope, works intended. why?
Comments
Post a Comment