tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 9980] - exception object is null inside an error page (given certain conditions)
Date Thu, 20 Jun 2002 00:26:34 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=9980>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=9980

exception object is null inside an error page (given certain conditions)





------- Additional Comments From steve5m@yahoo.com  2002-06-20 00:26 -------
The spec actually seems unclear to me -- it makes it clear than if
an exception happens in a JSP, the 'exception' variable should be set
and the attribute "javax.servlet.jsp.jspException" should also be set
(and I assume these two would be the same thing)
- but it doesn't seem to make a statement about whether or not the
'exception' variable should still be set if the exception is from
non-JSP code (servlet or from a class that JSP calls).
It seems to me that it should - this makes it easier to write an error page
because generally I don't care where the exception came from (JSP or servlet)
I just want to work with it - nice if I only have to look one place for it.

Results of some more testing (just the facts of what actually happens):
Tomcat 3.3.1:
   Exception thrown by JSP:
      exception object is null: false
      jspException object is null: false
      servletException object is null: true

   Exception thrown by servlet:
      exception object is null: false
      jspException object is null: false
      servletException object is null: true

Tomcat 4.0.4:
   Exception thrown by JSP:
     exception object is null: false
     jspException object is null: false
     servletException object is null: false

   Exception thrown by servlet:
      exception object is null: true
      jspException object is null: true
      servletException object is null: false

-- This data shows that Tomcat 3.3.1 and 4.0.4 behave somewhat differently,
but I'm not sure which is really the behavior mandated by the Servlet/JSP
spec.

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


Mime
View raw message