RE: Error 500 with stack trace

"Kai Virkki EFECTE" <[email protected]> Wed, 3 May 2006 09:02:06 +0300
Newsgroups gmane.text.xml.resin.user
Message-ID <[email protected]>
Hi,
 
I've noticed that there's a difference on how Resin 3 handles
errorpage-things compared to Resin 2. It seems that if there is an error
in your JSP after something is already written to the response and its
buffer has been committed, the errorpage cannot be shown anymore via the
forward mechanism. This is propably what the spec expects, but Resin 2
didn't work like this...
 
-Kai

________________________________

From: [email protected]
[mailto:[email protected]] On Behalf Of Gary Wells
Sent: 2. toukokuuta 2006 21:33
To: [email protected]
Subject: RE: Error 500 with stack trace



To clarify my two questions further...

 

1) How do you get the custom error 500 page to display? I've got the
following in my web.xml:

 

<error-page>

    <error-code>500</error-code>

    <location>/500.jsp</location>

  </error-page>

 

... but when an 500 error is thrown I get the following error message:

 

java.lang.IllegalStateException: forward() not allowed after buffer has

committed.

at
com.caucho.server.webapp.RequestDispatcherImpl.forward(RequestDispatcher
Impl.java:139)

at
com.caucho.server.webapp.RequestDispatcherImpl.error(RequestDispatcherIm
pl.java:113)

at
com.caucho.server.webapp.ErrorPageManager.sendServletError(ErrorPageMana
ger.java:363)

at
com.caucho.server.webapp.WebAppFilterChain.doFilter(WebAppFilterChain.ja
va:180)

at
com.caucho.server.dispatch.ServletInvocation.service(ServletInvocation.j
ava:229)

at
com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:268)

at com.caucho.server.port.TcpConnection.run(TcpConnection.java:389)

at com.caucho.util.ThreadPool.runTasks(ThreadPool.java:492)

at com.caucho.util.ThreadPool.run(ThreadPool.java:425)

at java.lang.Thread.run(Thread.java:613)

 

 

2) How do you gain access to the stack trace of the original exception
so it can be displayed?

 

 

Thanks - G

 

________________________________

From: Gary Wells [mailto:[email protected]] 
Sent: Tuesday, May 02, 2006 10:51 AM
To: '[email protected]'
Subject: Error 500 with stack trace

 

Does anybody know how to setup Resin with a custom page for an error 500
that displays the stack trace?

 

Thanks - G