• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

GlobalExceptionHandler prolem

 
Ranch Hand
Posts: 2596
Android Firefox Browser Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 157
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
That which doesn't kill us makes us stronger. I think a piece of pie wouldn't kill me. Tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic