https://bz.apache.org/bugzilla/show_bug.cgi?id=64965

            Bug ID: 64965
           Summary: IllegalStateException is thrown in
                    JspContextWrapper.findAttribute()
           Product: Tomcat 9
           Version: 9.0.40
          Hardware: All
                OS: All
            Status: NEW
          Severity: minor
          Priority: P2
         Component: Jasper
          Assignee: dev@tomcat.apache.org
          Reporter: andreas.bergan...@gmail.com
  Target Milestone: -----

We get an IllegalStateException from JspContextWrapper.findAttribute() in our
logs every now and then due to the session being invalid while resolving EL
variables.

In PageContextImpl.findAttribute() this exception is caught. But the exception
is not caught in JspContextWrapper.findAttribute(). Shouldn't the same error
handling be applied to JspContextWrapper? And according to the javadoc in
JspContext the findAttribute method should not throw IllegalStateException. Or
is there a reason for not catching that exception?

In PageContextImpl.findAttribute():

try {
        o = session.getAttribute(name);
} catch(IllegalStateException ise) {
        // Session has been invalidated.
        // Ignore and fall through to application scope.
}

In JspContextWrapper.findAttribute():

if (getSession() != null) {
        o = rootJspCtxt.getAttribute(name, SESSION_SCOPE);
}

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to