user3876178
user3876178

Reputation: 241

Exceptions in Apache Tomcat - Errorpage

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

Answers (1)

Start0101End
Start0101End

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

Related Questions