| Author |
JSP Exception
|
Bandita Acharya
Greenhorn
Joined: Mar 23, 2010
Posts: 20
|
|
How to handle Exception in JSP?please give one example..
Thanks in advance
|
 |
Devaka Cooray
Saloon Keeper
Joined: Jul 29, 2008
Posts: 2691
|
|
|
"bandita java", please check your private messages regarding an important administrative matter.
|
Author of ExamLab (Download) - the free mock exam kit for SCJP / OCPJP
Home Page -- Twitter Profile -- JavaRanch FAQ -- How to Ask a Question
|
 |
Hussein Baghdadi
clojure forum advocate
Bartender
Joined: Nov 08, 2003
Posts: 3359
|
|
It is a super best practice not to include Java snippets in your JSP markup.
All coding stuff should be done in Servlets (or in your framework Action classes or whatever it called), JSP should only be used for producing the markup.
|
 |
Devaka Cooray
Saloon Keeper
Joined: Jul 29, 2008
Posts: 2691
|
|
|
You can catch the runtime exceptions by using the <c:catch> tag of JSTL
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56153
|
|
|
You shouldn't. Define a centralized error handler in the deployment descriptor.
|
[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
|
 |
Aman Goel
Greenhorn
Joined: Jan 14, 2010
Posts: 15
|
|
I will suggest you to use centralize error page in JSP.
By doing so ,if any error will come, it will redirected to error page. Here you can handle the errors.
|
 |
 |
|
|
subject: JSP Exception
|
|
|