aspose file tools*
The moose likes JSP and the fly likes exception handling in jsps Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "exception handling in jsps" Watch "exception handling in jsps" New topic
Author

exception handling in jsps

npk chowdary
Greenhorn

Joined: Dec 09, 2007
Posts: 21
is there any issues in handling exceptions in jsps other than handling exception in error pages
1) by giving page directive isErrorPage="true"
2)by coding in scriplets.
I mean that is there any JSTL tags to handle the exceptions in jsps.
Thanks in anticipation
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61218
    
  66

Generally, you shouldn't be handling exceptions in a JSP. Heck, you shouldn't even be doing anything that's capable of generating exceptions.

That said, check out the JSTL Specification for the answer to your question.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
npk chowdary
Greenhorn

Joined: Dec 09, 2007
Posts: 21
thank you very much.
But I came through catch tag in jstl/core
Elie Hirschman
Ranch Hand

Joined: Dec 15, 2005
Posts: 37
I've used it for when something unexpected happens with a custom tag and it's better than a broken jsp.



It's kind of a last resort, and should be temporary until you figure out how to better handle the exception (server-side).
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: exception handling in jsps