I am using Tomcat 4.0.3, Windows 2000, JDK 1.4

I was getting the following stack trace from a JSP:

ApplicationDispatcher[/SpendMetrix]: Servlet.service() for servlet jsp
threw exception 
javax.servlet.ServletException

at
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContex
tImpl.java:463)         
at org.apache.jsp.getInfo$jsp._jspService(getInfo$jsp.java:3432)        
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)  
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)

etc...

which is quite unhelpful because line 3432 in getInfo$jsp.java is just
the location of the catch-all exception handler. The actual cause of the
exception is lost in the mists. I edited getInfo$jsp.java by hand and
added a t.printStackTrace and recompiled it, which handily located the
real error. 

That got me thinking, why couldn't Jasper do this? Maybe
PageContextImpl.handlePageException() could print (or, better yet, log)
the initial Throwable before re-throwing the ServletException.

I'm surprised that I don't get the root cause through the chained
exception facility of JDK 1.4, since that's what I'm using.
handlePageException does "throw new ServletException(t)" so I should get
the root cause from the stack trace.


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to