My jstl build is 1.1.1. When I try to make a test with "<c:if" using an variable defined in scriptlet, the test fail with the stacktrace: java.lang.IllegalStateException: getAttribute: Session already invalidated org.apache.catalina.session.StandardSession.getAttribute (StandardSession.java:975) org.apache.catalina.session.StandardSessionFacade.getAttribute (StandardSessionFacade.java:113) org.apache.jasper.runtime.PageContextImpl.doFindAttribute (PageContextImpl.java:469) org.apache.jasper.runtime.PageContextImpl.findAttribute (PageContextImpl.java:454) org.apache.commons.el.VariableResolverImpl.resolveVariable (VariableResolverImpl.java:157) org.apache.jasper.runtime.PageContextImpl.resolveVariable (PageContextImpl.java:833) org.apache.commons.el.NamedValue.evaluate(NamedValue.java:124) org.apache.commons.el.UnaryOperatorExpression.evaluate (UnaryOperatorExpression.java:156) org.apache.commons.el.ExpressionEvaluatorImpl.evaluate (ExpressionEvaluatorImpl.java:263) org.apache.commons.el.ExpressionEvaluatorImpl.evaluate (ExpressionEvaluatorImpl.java:190) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate (PageContextImpl.java:899) org.apache.jsp.jsp.index_jsp._jspx_meth_c_if_0(index_jsp.java:316) ... I'm using session and variable this way: <% if(!session.isNew()) session.invalidate(); String msg = (String) request.getAttribute("msg"); %> I'm testing using variable msg this way: ... <c:if test="${!empty msg}"> <tr> <td valign="top" align="center" colspan="3"><font color="red">${msg}</font></td> </tr> </c:if> ... I feel that "<c:if" try to find "msg" in session, when there's no session valid. Thanks
This is a JSP container problem (not JSTL). See bug 37929. *** This bug has been marked as a duplicate of 37929 ***