File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSP and the fly likes Handle all error codes other than one Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "Handle all error codes other than one" Watch "Handle all error codes other than one" New topic
Author

Handle all error codes other than one

sudheshna Iyer
Ranch Hand

Joined: Aug 20, 2004
Posts: 71
I want to handle 404 error and for all other error codes, I want to have a default error page.

I am using spring.

<error-page>
<error-code>404</error-code>
<location>/exception/404.htm</location>
</error-page>
<error-page>
<error-code>*</error-code> ===> This syntax is not correct. Is there any way to define this?
<location>/exception</location>
</error-page>
Keerthi Pandey
Greenhorn

Joined: Feb 08, 2009
Posts: 7
You rather use this. This might help you..

<error-page>
<error-code>404</error-code>
<location>/exception/404.htm</location>
</error-page>

<error-page>
<exception-type>java.lang.Exception</exception-type>
<location>/exception</location>
</error-page>



 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Handle all error codes other than one