File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "java.lang.Throwable in web.xml" Watch "java.lang.Throwable in web.xml" New topic

java.lang.Throwable in web.xml

Neeraj Vij
Ranch Hand

Joined: Nov 25, 2003
Posts: 315

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,
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

Joined: Jan 10, 2002
Posts: 63865

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

[Asking smart questions] [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?

[] [Full WebApplication JSF EJB JPA JAAS with source code to download] One Table Per SubClass [Web/JSF]
I agree. Here's the link:
subject: java.lang.Throwable in web.xml
It's not a secret anymore!