GeeCON Prague 2014*
The moose likes Struts and the fly likes Handling JSP exceptions in Struts2‏ Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Handling JSP exceptions in Struts2‏" Watch "Handling JSP exceptions in Struts2‏" New topic
Author

Handling JSP exceptions in Struts2‏

Andy Hahn
Ranch Hand

Joined: Aug 31, 2004
Posts: 225
Using the Exception interceptor works great for catching exceptions throw by actions. However I am wondering what is the recommended method for catching and handling exceptions thrown by a JSP? I assume that JSP exceptions are outside the S2 scope and are to be handled at the container level?
Jaydeep Sapariya
Greenhorn

Joined: Oct 21, 2008
Posts: 4
You can defined error page to catch exception in JSP Page.
Andy Hahn
Ranch Hand

Joined: Aug 31, 2004
Posts: 225
Yeah I know I can do that, but is that what Struts2 developers are doing, or is there another Struts2 way to achieve this? I should have added in my OP that I am well aware of web.xml error pages, etc. Please experienced S2 repliers only.
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Hmm, how do we know if we're "experienced enough" to answer your question?
Andy Hahn
Ranch Hand

Joined: Aug 31, 2004
Posts: 225
Hmmm well lets see Dave, you have over 300 posts and are also on the S2 user list. That's experienced. If you have, lets say, 4 posts, then maybe stating the obvious is going to irritate some of us. Maybe its a problem with the message board format since my "0" reply message just jumped up to 4, and if other people are like me then they will breeze right past my question. On an email list, there is no reply count. I have had this frustration for a long time on this forum. The worst is when other hijack my thread or bartenders jump in to correct people on naming conventions and before you know it I have 6 replies to my thread with no answer.
 
GeeCON Prague 2014
 
subject: Handling JSP exceptions in Struts2‏