*
The moose likes Struts and the fly likes java.lang.Throwable in web.xml Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "java.lang.Throwable in web.xml" Watch "java.lang.Throwable in web.xml" New topic
Author

java.lang.Throwable in web.xml

Neeraj Vij
Ranch Hand

Joined: Nov 25, 2003
Posts: 315
Hi,

I have given in my web.xml to catch any handled exception in my struts based application and redirect the user to an error page.


But in some cases, it does not redirect the user to error page. instead the exception message is printed on the broken jsp.

Kindly advise, what could be reason for it and what else should be done in case any error occurs while processing the jsp and redirect the user to an error page.


Many Thanks,
Neeraj
Harpreet Singh janda
Ranch Hand

Joined: Jan 14, 2010
Posts: 317

In case of Struts this setting should be in struts.xml instead of web.xml
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60752
    
  65

Please be sure to ask Struts questions in the Struts forum. I have moved this post there for you.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Hebert Coelho
Ranch Hand

Joined: Jul 14, 2010
Posts: 754

Hello, Neeraj Vij.

Sometimes there is a problem running it at IE. There is a workarround in my signature that shows how to handle exceptions.

Can you show us the complete exception tags at you web.xml?


[uaiHebert.com] [Full WebApplication JSF EJB JPA JAAS with source code to download] One Table Per SubClass [Web/JSF]
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: java.lang.Throwable in web.xml
 
Similar Threads
error page
JSP-Error Page HF Servlets &JSP Page 594
error-page element in web.xml
Displaying a Default Error page
process errors of user defined URL