File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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

exception handling in jsps

npk chowdary

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

Joined: Jan 10, 2002
Posts: 63858

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] [About Bear] [Books by Bear]
npk chowdary

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).
I agree. Here's the link:
subject: exception handling in jsps
It's not a secret anymore!