This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
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


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
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