I would like to display a single(custom) web page when tomcat encounters different errors such as 403, 404, 405 etc. I have tried with the below solutions.
I have pasted my custom error.html in the prweb folder in webapps folder and pasted the below code in web.xml
<error-page>
<location>$Catalina_home/WEB-INF/webapps/prweb/error.html</location>
</error-page>
Output : Tomcat didn't launch my app and directly displayed 404 error page.
I have pasted my custom error.html in the WEB-INF folder in webapps folder and pasted the below code in web.xml
<error-page>
<location>./error.html</location>
</error-page>
Output : Tomcat didn't launch my app and directly displayed 404 error page.
Can anyone please help me where I went wrong?