Bug 42071 - If a JSP throws an UnavailableException twice, an IllegalStateException occurs.
Summary: If a JSP throws an UnavailableException twice, an IllegalStateException occurs.
Status: RESOLVED FIXED
Alias: None
Product: Tomcat 5
Classification: Unclassified
Component: Jasper (show other bugs)
Version: 5.5.23
Hardware: All All
: P2 normal (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-04-08 17:49 UTC by kawasima
Modified: 2007-04-18 19:29 UTC (History)
0 users



Attachments
An IllegalStateException does not occurred with this patch. (391 bytes, patch)
2007-04-08 18:01 UTC, kawasima
Details | Diff
reappearance jsp (216 bytes, text/plain)
2007-04-17 00:40 UTC, kawasima
Details

Note You need to log in before you can comment on or make changes to this bug.
Description kawasima 2007-04-08 17:49:37 UTC
If a JSP throws an UnavailableException twice, an IllegalStateException occurs.

first access:
JSP throws UnavailableException.

second access:
If the JSP throws an UnavailableException again then an IllegalStateException
occurs and Tomcat returns status code:500 to the client.

The problem is not that the IllegalStateException occurs.
The problem is that the JSP can be called even though it cannot be used.
Comment 1 kawasima 2007-04-08 18:01:24 UTC
Created attachment 19924 [details]
An IllegalStateException does not occurred with this patch.

An IllegalStateException does not occurred with this patch.
Comment 2 Mark Thomas 2007-04-14 17:45:07 UTC
I don't see an ISE with the latest source from svn.

If you still see the ISE with the latest svn source, please re-open this issue
and attach your JSP that shows the ISE.
Comment 3 kawasima 2007-04-17 00:40:41 UTC
Created attachment 19974 [details]
reappearance jsp

reappearance jsp
Comment 4 kawasima 2007-04-17 00:48:31 UTC
I see the ISE with the latest svn source.

It reappears in the following procedure.

first request:
/test.jsp?exp=true

second request:
/test.jsp?exp=true

[JSP]
<%@ page contentType="text/plain" %>
<%
    String exp = request.getParameter("exp");
    if("true".equalsIgnoreCase(exp)) {
        throw new UnavailableException("error!!!");
    }
    System.out.println("done!");
%>
done!
Comment 5 Mark Thomas 2007-04-18 19:29:09 UTC
This has been fixed in svn and will be included in 5.5.24 onwards and 6.0.12
onwards.

Thanks for the report and the test case.