The Apache Tomcat error page (e.g. 404 not found) includes the Tomcat server version.
All supported versions.
To configure the Tomcat server so that it doesn't reveal its version in publicly accessible error reports (https://servername:8880/<page>), edit
your ServerInfo.properties
1. Find the catalina.jar file in your Tomcat installation and extract the ServerInfo.properties file from it.
$SMARTS_HOME/smarts/CONSOLE/smarts/tomcat/lib
Note: Make a copy of Original catalina.jar and the file permissions-owner information for further references.
2. To extract the ServerInfo.properties file from catalina.jar, run the following:
jar xf catalina.jar org/apache/catalina/util/ServerInfo.properties
This command instructs jar to extract the ServerInfo.properties file that is located in /org/apache/catalina/util inside catalina.jar.
You can change these values to anything you like or delete a value. For instance, you could change the following parameters:
server.info=Apache Tomcat <tomcat version>
server.number=<version>
-----------to the below:-----------
server.info=Apache Tomcat
server.number=0.0.0.0
When you're happy with the changes, save the file and exit. You will still need to compress the modified file to catalina.jar, which you can do
with the following command:
jar uf catalina.jar org/apache/catalina/util/ServerInfo.properties
Note: You can delete the org directory after you've replaced it with your modified one or move it to a temporary location for further references.
3. Set the correct file permissions-owners again as per the reference earlier.
Example:
-rw-r----- 1 root root 1.5M Dec* 3* 2025 catalina.jar
4. Restart tomcat service.
To restart the tomcat service used by the console, use the sm_service command from /$SMARTSHOME/CONSOLE/smarts/bin/
./sm_service stop WEBCONSOLE
./sm_service start WEBCONSOLE
NOTE. Do not use proprietary tomcat commands!!!
Running Tomcat as an independent function instead of using sm_service causes log rotation failures and orphaned processes․ We would see:
Logs written to tomcat/logs instead of smarts/local/logs
Log rotation fails to trigger or manage new log files
Tomcat processes become orphaned with no active log output
Environment variables and heap adjustments fail to apply
The CONSOLE webpage would be up but we would not see it from a sm_service show command e.g.
./sm_service showRUNNING NPM-OSPFRUNNING SMARTS-WEBSWINGRUNNING AM-PMRUNNING OPENSEARCHRUNNING NPM-EIGRPNOT RUNNING SYSLOG-ADAPTERRUNNING BROKERRUNNING NPM-ISISRUNNING RABBITMQRUNNING MBIMRUNNING NPM-BGPRUNNING TOMCATNOT RUNNING TRAP-ADAPTERRUNNING SAM-PRESRUNNING OIRUNNING SAMRUNNING CASRUNNING IP-CONFIGRUNNING ESMNOT RUNNING WEBCONSOLE
NOTE. There are 2 TOMCAT services running on this example server;