• Post Reply Bookmark Topic Watch Topic
  • New Topic

handling exceptions in jsp

 
aman hindustani
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello to all...

1.How to catch expection in jsp.

2. In jsp the uncaught exception can be handled through..by giving
<@ page errorpage="ErrorDefinedpage">..By redireting to the ErrorDefinedpage ...is there any other way to handle..this .

if there.. let me know.

Thanks
 
Carl Trusiak
Sheriff
Posts: 3341
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Using the c:catch tag in jstl http://www.informit.com/articles/article.asp?p=31341&rl=1
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65530
108
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Generally, you shouldn't be catching exceptions in a JSP. Could you explain why you feel the need to do so?

Declaring error handing in the deployment descriptor (web.xml) is usually the best way to deal centrally with exceptions thrown in a web application.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!