This week's book giveaway is in the OCAJP forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide 1Z0-808 and have Jeanne Boyarsky & Scott Selikoff on-line! See this thread for details.
I wrote a web app using struts, I have JSP that calls some Action classes and eventually forward to other JSPs. Assuming I don't want to catch any of the exceptions in the Action classes, how should "implement" the error handling ? A fellow suggest I just type the dummy </html:erros> in every JSP pages, does that make sense ? should I define some <global exception> in the struts-config.xml ?
Also you can associate some Exceptions with an action. You can define each oof these exceptions with the help of a Custom exception class or an Existing Exception class. You can also specify where you forward on these exceptions.
Hope this will help you.
Joined: Jun 21, 2005
I am more interested in other types of exceptions like SQLException, classnotfound exception, IO exception, etc. Since the web application includes a series of JSP and Actions (JSP1-->Action 1-->JSP 2 -->Action 2-->JSP 3 -->Action 3-->...), where should I catch the exceptions ? should I catch them in the last Action only ?