Reputation: 241
I have an Application on a Tomcat Server. Sometimes I got an Exception and the user gots the Tomcat error message in his Browser. How can I change this error message with a normal HTML/JSP site like "Ops, something went wrong :("?
Upvotes: 0
Views: 188
Reputation: 108
You can create simple html files for the error messages you want to show for respective errors and try putting something like below for the error messages you want to show differently then the default tomcat service error message.
< error-page>
< error-code>503< /error-code>
< location> /errors/503.html < /location>
< /error-page>
FYI : Just remove the additional spaces from the above HTML. Do not know how to post HTML as an answer.
Check http://linux-sxs.org/internet_serving/c581.html for further reference.
Upvotes: 1