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

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -