This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
The moose likes Servlets and the fly likes Routing servlet exceptions to a particular jsp page? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Routing servlet exceptions to a particular jsp page?" Watch "Routing servlet exceptions to a particular jsp page?" New topic
Author

Routing servlet exceptions to a particular jsp page?

Jignesh Gohel
Ranch Hand

Joined: Dec 28, 2004
Posts: 276
Hi,

In my MVC based application, i want to route my exceptions raised in my model classes to a particular jsp page.

I want to generalize these exceptions ie i want to make a general class to which i can route my exception generated & from that class i want to display that jsp error page displaying the problem??

So how to do that??


Thanks,
Jignesh
[ March 27, 2006: Message edited by: Bear Bibeault ]

Regards,
Jignesh

The Art Of Life Is To Know When To Be Useless And When To Be Useful - CHUANG TZU
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Download a copy of the servlet spec, if you haven't already (link in my signagure) and have a look at section SRV.9.9.2.
You can get there quickly by searching for "error-page".

It answers your question pretty well.


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Routing servlet exceptions to a particular jsp page?
 
Similar Threads
use of <bean:write> and <bean:message> ???
Error Handling and the Response Object
Tiles 2.x.x Question
Log4j in JSP
javascript call from instantiated class which extends JApplet