{"id":4507,"date":"2015-03-31T09:10:56","date_gmt":"2015-03-31T01:10:56","guid":{"rendered":"http:\/\/rmohan.com\/?p=4507"},"modified":"2015-03-31T09:10:56","modified_gmt":"2015-03-31T01:10:56","slug":"tomcat-version-change","status":"publish","type":"post","link":"https:\/\/mohan.sg\/?p=4507","title":{"rendered":"Tomcat Version Change"},"content":{"rendered":"<p>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 &#8211;<\/p>\n<p><a href=\"http:\/\/rmohan.com\/wp-content\/uploads\/2015\/03\/tomcat-safas.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-4508\" src=\"http:\/\/rmohan.com\/wp-content\/uploads\/2015\/03\/tomcat-safas.jpg\" alt=\"tomcat safas\" width=\"319\" height=\"227\" srcset=\"https:\/\/mohan.sg\/wp-content\/uploads\/2015\/03\/tomcat-safas.jpg 319w, https:\/\/mohan.sg\/wp-content\/uploads\/2015\/03\/tomcat-safas-300x213.jpg 300w, https:\/\/mohan.sg\/wp-content\/uploads\/2015\/03\/tomcat-safas-150x107.jpg 150w\" sizes=\"(max-width: 319px) 100vw, 319px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>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.<\/p>\n<p>In this article we will see how we can change the version number on the error page to a different one.<\/p>\n<p>Create a Directory location in \u00a0Tomcat Server lib location as<\/p>\n<p>mkdir \u2013p \/lib\/org\/apache\/catalina\/util\/<\/p>\n<p>In the util location, create a properties file as<\/p>\n<p>[root@localhost util]# cat ServerInfo.properties<\/p>\n<p>server.info=Apache Tomcat Version XXX<\/p>\n<p>Now restart tomcat and access a application which is not available and we will see this,<\/p>\n<p>&nbsp;<\/p>\n<p><a href=\"http:\/\/rmohan.com\/wp-content\/uploads\/2015\/03\/tomcat-3.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-4509\" src=\"http:\/\/rmohan.com\/wp-content\/uploads\/2015\/03\/tomcat-3.jpg\" alt=\"tomcat 3\" width=\"341\" height=\"218\" srcset=\"https:\/\/mohan.sg\/wp-content\/uploads\/2015\/03\/tomcat-3.jpg 341w, https:\/\/mohan.sg\/wp-content\/uploads\/2015\/03\/tomcat-3-300x192.jpg 300w, https:\/\/mohan.sg\/wp-content\/uploads\/2015\/03\/tomcat-3-150x96.jpg 150w\" sizes=\"(max-width: 341px) 100vw, 341px\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>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 &#8211;<\/p>\n<\/p>\n<p>&nbsp;<\/p>\n<p>The Error page will also display the Version of the [&#8230;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[21],"tags":[],"_links":{"self":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/4507"}],"collection":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4507"}],"version-history":[{"count":1,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/4507\/revisions"}],"predecessor-version":[{"id":4510,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/4507\/revisions\/4510"}],"wp:attachment":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4507"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4507"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4507"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}