Forums Register Login

Handle all error codes other than one

+Pie Number of slices to send: Send
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>
+Pie Number of slices to send: Send
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>



Uh oh, we're definitely being carded. Here, show him this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 1156 times.
Similar Threads
Displaying a Default Error page
Handling multiple error code through one entry in web.xml
response.setStatus
tomcat 5 and error page
handle exception in servlet
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 08:34:42.