This week's book giveaway is in the OCAJP forum.
We're giving away four copies of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) and have Khalid A Mughal & Rolf W Rasmussen on-line!
See this thread for details.
Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Handling JSP exceptions in Struts2‏

 
Andy Hahn
Ranch Hand
Posts: 225
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can defined error page to catch exception in JSP Page.
 
Andy Hahn
Ranch Hand
Posts: 225
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hmm, how do we know if we're "experienced enough" to answer your question?
 
Andy Hahn
Ranch Hand
Posts: 225
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic