struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eirik Kj°lsrud" <wayb...@frisurf.no>
Subject Errorhandling - ServletException
Date Fri, 13 Jun 2003 07:36:38 GMT
Hi.

I've set up a custom errorhandler in Struts that catches every exception
that occurs in the Actions, and presents an errorpage. This works perfectly.

The jsp-pages that represents the 'view' sometimes throws an exception, and
I have set up an errorhandler in the web.xml file to handle that. Actually
this errorhandler forwards to an action which throws an exception that is
caught by the beforementioned custom errorhandler and is therefore handled
and logged the same way. Unfortunately the errorhandler specified in web.xml
does not trigger on servletexceptions. I have tried it with http-errorcodes
(400, 404, etc.) and then it works, but when an exception is thrown in the
jsps, a message like this is presented on screen :

[ServletException
in:/WEB-INF/protectedJSP/content/content-gameparamEdit.jsp] null'

My set up in web.xml is :

<error-page>

<error-code>404</error-code>

<location>/jSPErrorHandler.do</location>

</error-page>

<error-page>

<exception-type>javax.servlet.ServletException</exception-type>

<location>/jSPErrorHandler.do</location>

</error-page>

I haven't added any error-code elements in my jsps. What do I need to
trigger /jSPErrorHandler.do when a ServletException occurs ?

Best Regards
Eirik Kj°lsrud, Norway




---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Mime
View raw message