wood burning stoves*
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
Author

Servlet Error Code

vipul bondugula
Ranch Hand

Joined: Oct 14, 2010
Posts: 218
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 done.so i am posting the code here..If anyone could please help in solving this.


web.xml




my customexception class


RaiseException code



Thanks
Vipul Kumar
Miku Ranjan
Ranch Hand

Joined: Oct 11, 2011
Posts: 98
Hi,
Please check the link below may be useful to you.
http://www.jguru.com/faq/view.jsp?EID=1347
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.


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

Joined: Nov 09, 2011
Posts: 973
    
    5

Hi

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: http://aspose.com/file-tools
 
subject: Servlet Error Code
 
Similar Threads
Help executing an EJB persistence application
HTTP Status 404 - /EmpServletDemo/EmpServlet
Not able to run sample servlet + jsp
Running a servlet on Tomcat using Eclipse
Redirecting to HTTPS