Tools

Remove the embedded Tomcat version from the error message

This article describes how to remove the version string from Tomcat HTTP error messages by repackaging the catalina.jar with an updated ServerInfo.properties file.

First published date

10/18/2018 9:31 AM

Last published date

12/23/2019 3:59 PM

Overview

There are instances that the generic server error that shows the version of Tomcat has to be obscured, such as for PCI compliance. This article describes how to remove the version string from Tomcat HTTP error messages by repackaging the catalina.jar file with an updated ServerInfo.properties file.

 

Product section

Web Help Desk

Resolution

  1. Go to <WHD_INSTAL_DIR>/bin/tomcat/lib.
  2. Run the following command to unpack the catalina.jar file:
    jar xf catalina.jar org/apache/catalina/util/ServerInfo.properties
  3. Update the ServerInfo.properties file by changing the server.info line to server.info=Apache Tomcat.
  4. Run the following command to repackage the catalina.jar file:
    jar uf catalina.jar org/apache/catalina/util/ServerInfo.properties
    Remove <WHD_INSTAL_DIR>/bin/tomcat/lib/org. This file was created when the ServerInfo.properties file was extracted.
  5. Restart WHD.

PS: The Tomcat version vulnerability has been addressed in Web Help Desk version 12.7. The resolution above is only applicable for Web Help Desk version 12.6 and lower.