This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
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

Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
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: 60046

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

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
Similar Threads
exception handling
how exception is handled in constructor
Help me in Exception Handling
Any recipes for Exception handling
Problem in unzipping a folder using API