Win a copy of The Way of the Web Tester: A Beginner's Guide to Automating Tests this week in the Testing forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Implicit Exception Object

Mark Gowdy
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have created an error.jsp page to display a generic error message, along with the option to see the stacktrace and exception message. To test this, I throw a RuntimeException in a servlet which causes my error.jsp to display. The error message I created is shown, but if I add <%= exception.getMessage %> to the jsp then I see no content in the page.
I added a section in the page to check if the exception was null and, lo and behold, it was!!
Does anyone have any idea why the exception is no longer in the page scope?
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic