Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

exception handling

Status
Not open for further replies.
Apr 13, 2004
16
0
0
DE
hallo

can anyone told me: how works the global exception handling in strut. i declare something like:

<global-exceptions>
<exception
type="javax.servlet.ServletException"
path="/pages/error.jsp"/>
<exception
type="java.lang.InstantiationException"
path="/pages/error.jsp"/>
</global-exceptions>

but it works only sometimes. how can i access the exception message in the error.jsp?

thanks a lot.
 
It may not be a good practice to catch exception in JSP. So is better to catch it in your struts code itself and handle appropriately.

For Exception handling unless specifically required, it is better to cath the base jave Exception so that for any exception it will show your \pages\error.jsp page.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top