We have tomcat 8.5 web server in production. The problem we are facing is we want to show the custom error page for 400 error .I was updated server.xml as follows.
<Valve className="org.apache.catalina.valves.ErrorReportValve"
errorCode.400="webapps/ROOT/error400.html"
errorCode.0="webapps/ROOT/errorOthers.html"
showReport="false"
showServerInfo="false" />
and conf/web.xml as
<error-page>
<error-code>400</error-code>
<location>webapps/ROOT/error400.html</location>
</error-page>
we have error400.html and errorOthers.html in our application ROOT folder in directory of tomcat. Real Problem is tomcat not able to redirect to error.html when the user enters malformed URL in the browser and Tomcat is showing the default 400 bad request error page instead of the custom error page. Is there any way to solve this issue?