It's not a secret anymore!
The moose likes Servlets and the fly likes Servlet Error Code Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Servlet Error Code" Watch "Servlet Error Code" New topic

Servlet Error Code

vipul bondugula
Ranch Hand

Joined: Oct 14, 2010
Posts: 219
Hi Everyone,

I am developing a project on servlets. I want to define my custom exceptions in web.xml file. i developed my own custom exception class.
In the servlet program i threw the exception. so that my container need to check the exception object in web.xml file and move to corresponding page as configured.

I am unable to get the error page i have configured...

Unable to get the mistake what i have i am posting the code here..If anyone could please help in solving this.


my customexception class

RaiseException code

Vipul Kumar
Miku Ranjan
Ranch Hand

Joined: Oct 11, 2011
Posts: 98
Please check the link below may be useful to you.
Hebert Coelho
Ranch Hand

Joined: Jul 14, 2010
Posts: 754

Is there any exception? or nothing happens?

I this psot I show how to Handling Exceptions on a WebApp.

I hope it helps you.

[] [Full WebApplication JSF EJB JPA JAAS with source code to download] One Table Per SubClass [Web/JSF]
James Boswell

Joined: Nov 09, 2011
Posts: 1051


On line 9 of RaiseException, a java.lang.ArithmeticException will be thrown. Has this been left in by accident?

I think more information on what the output of invoking the servlet is would be helpful.
I agree. Here's the link:
subject: Servlet Error Code
jQuery in Action, 3rd edition