File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes GlobalExceptionHandler prolem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "GlobalExceptionHandler prolem" Watch "GlobalExceptionHandler prolem" New topic
Author

GlobalExceptionHandler prolem

Manish Hatwalne
Ranch Hand

Joined: Sep 22, 2001
Posts: 2581

I have a global exception handler configured as follows -



It works as desired (shows nice page to user and puts stack trace in log) when theres an exception Actions, but when there's an exception in the custom RequestProcessor that we have it shows the entire stck trace for wrro 500 in th ebrowser. I wonder why??? How can I take care of that as well? Moreover, are there any other execptions possible whcih will not be caught by this GlobalExceptionHandler?

TIA,
- Manish
Sheldon Fernandes
Ranch Hand

Joined: Aug 18, 2004
Posts: 157
Using the struts exception handlers, I think you can only catch exceptions thrown from Action classes. Exceptions could be thrown from JSPs and your request processor class which you will need to handle.

The JSP errors can be handled using the "page" directive isErrorPage and errorPage attributes. You could use try-catch too in your JSP and even in your request processor class. You can also handle exceptions thrown from a servlet in the web.xml by using <exception-type>.

Sheldon Fernandes
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: GlobalExceptionHandler prolem