Remove Tomcat Version From Error Pages

Ryan Carrie shared this idea 11 months ago
Idea Logged

When an error page is displayed, the Apache Tomcat version is shown:

c71bb26b7c53d627868d9f9ca4055d98

Can this be hidden?

Comments (1)

photo
1

While it's not directly possible to hide this version, a custom error page can be provided to Tomcat. This can be implemented in the <YellowfinInstall>/appserver/webapps/ROOT/WEB-INF/web.xml:

<error-page>
  <error-code>500</error-code>
  <location>/errors/error500.html</location>
</error-page>
<error-page>
  <error-code>404</error-code>
  <location>/errors/error404.html</location>
</error-page>

This will prevent the default Tomcat error pages which show the version. I am logging this as an Enhancement to consider developing custom error pages that will ship with the product, however in the meantime your own webpage can be supplied as above.

Please note the above configuration must be at the bottom of your web.xml file above the </webapp> tag. In addition the errors folder must exist inside the <YellowfinInstall>/appserver/webapps/ROOT folder and must contain the custom HTML files.


Thanks, Ryan