Bug 37699 - c:if test fail when session invalidated using el
Summary: c:if test fail when session invalidated using el
Status: RESOLVED DUPLICATE of bug 37929
Alias: None
Product: Taglibs
Classification: Unclassified
Component: Standard Taglib (show other bugs)
Version: 1.1.0
Hardware: PC Windows 2000
: P2 trivial (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-11-29 19:59 UTC by Sebastiao
Modified: 2005-12-15 17:00 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sebastiao 2005-11-29 19:59:13 UTC
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
Comment 1 Pierre Delisle 2005-12-16 02:00:01 UTC
This is a JSP container problem (not JSTL).
See bug 37929.



*** This bug has been marked as a duplicate of 37929 ***