You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2020/12/08 15:03:59 UTC

[Bug 64965] New: IllegalStateException is thrown in JspContextWrapper.findAttribute()

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.bergander@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-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 64965] IllegalStateException is thrown in JspContextWrapper.findAttribute()

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64965

--- Comment #1 from Remy Maucherat <re...@apache.org> ---
I read all the javadoc and verified and I agree with this.

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


Re: [Bug 64965] IllegalStateException is thrown in JspContextWrapper.findAttribute()

Posted by Mark Thomas <ma...@apache.org>.
15 minutes from initial report to 4 versions patched and issue resolved.

Nice.

Mark


On 08/12/2020 15:35, bugzilla@apache.org wrote:
> https://bz.apache.org/bugzilla/show_bug.cgi?id=64965
> 
> Remy Maucherat <re...@apache.org> changed:
> 
>            What    |Removed                     |Added
> ----------------------------------------------------------------------------
>              Status|NEW                         |RESOLVED
>          Resolution|---                         |FIXED
> 
> --- Comment #2 from Remy Maucherat <re...@apache.org> ---
> This will be fixed in Tomcat 10.0.1, 9.0.42, 8.5.62 and 7.0.108. Thanks.
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 64965] IllegalStateException is thrown in JspContextWrapper.findAttribute()

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64965

Remy Maucherat <re...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #2 from Remy Maucherat <re...@apache.org> ---
This will be fixed in Tomcat 10.0.1, 9.0.42, 8.5.62 and 7.0.108. Thanks.

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