While working with Tomcat, we observed that Tomcat displays Error Page which has the Tomcat version on it. When ever we call a page which is not available , the tomcat server will push a Error page along with the version like –
The Error page will also display the Version of the apache which may allow people to exploit the server since old tomcat server has some known exploits.
In this article we will see how we can change the version number on the error page to a different one.
Create a Directory location in Tomcat Server lib location as
mkdir –p /lib/org/apache/catalina/util/
In the util location, create a properties file as
[root@localhost util]# cat ServerInfo.properties
server.info=Apache Tomcat Version XXX
Now restart tomcat and access a application which is not available and we will see this,
Recent Comments