Having default Tomcat configuration may expose sensitive information, which helps hacker to prepare for an attack the application. This article describes how to remove the version string from Tomcat HTTP error messages without repackaging the catalina.jar. Based on our experience the standard approach is unzip the catalina.jar and remove the version.
Note: that all folder and file names are case sensitive.
- Go to <Tomcat_INSTAL_DIR>/bin/tomcat/lib.
- Create subfolders/directory structure as follows
- Create a text file as ServerInfo.properties
- Add the following lines, to ServerInfo.properties file and Save. You can choose any that you want to appear in the message.
- Stop and start tomcat service.
- Sample screenshot after making the above change.
- Tomcat start up log screen print