This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
I'm trying to run a simple scenario...I have a jsp (index.jsp) in the and i'm throwing an exception and ArithmeticException(divide b zero) using scriplet from this jsp. In the error page tag of the web.xml I have defined a page first.jsp to be displayed on an ArithmeticException. But, for some reason it ain't working. I have maked the first.jsp as an error page using isErrorPage...
This is the functionality I have observed running against Tomcat 7:
- Use the JSP as above
- Result: 500 error - error in log
- Remove the division by zero
- Result: succeeds - no exception is thrown
- Put the division by zero back
- Result - custom error message displayed
Obviously having a page that has successfully compiled/run at some point in time makes a difference.
Joined: Jul 06, 2005
Oh, and to print the stack trace to your JSP page (which you look like you were trying to do), use the following