Remove Tomcat Version From Error Pages

Ryan Carrie shared this idea 5 years ago
Idea Logged

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

c71bb26b7c53d627868d9f9ca4055d98

Can this be hidden?

Replies (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

photo
1

Hi Ryan,

I've a new YF 8.0.5-installation an no directory (webapps) with this name:

<YellowfinInstall>/appserver/webapps

What can I do?

Best regards...Karl-Josef

photo
1

Hi Karl-Josef,

Thanks for reaching out with your issue. You can identify the file path of your installation by navigating to 'Administration' > 'System Information' and expanding the 'System Properties' section. Below is an example of my test instance:

/0783c2485e36cfbe7a5a8896c09a5c23

This shows that Yellowfin is installed within the /opt/Yellowfin8 directory. The appserver directory represents Tomcat, which hosts the application. Within this directory should be a webapps folder, referenced within the documentation here.

Since the time of this writing I am no longer in the Support Team, but would be happy to facilitate a screen share with the appropriate resource if you're unable to locate the folder in question.

Thanks,

Ryan

photo
Leave a Comment
 
Attach a file