• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

disable tomcat version display

 
shivani anand
Ranch Hand
Posts: 155
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Right now when I type certail url which is using tomcat I get 404 error and also apache tomcat version . Due to security reason we do not want to display apache tomcat version. Could anyone please let me know how to disable this?

thanks
SA
 
Theodore Casser
Ranch Hand
Posts: 1902
Hibernate Netbeans IDE PHP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Best suggestion I can offer off the top of my head would be to write custom error pages for each application you're hosting, and a generic one for the entire server.

For the entire server, you're going to want to include this code in your $CATALINA_HOME/conf/web.xml file to block 404 errors (for example):


But, basically, if you override the default functionality, it should help you hide the footer that lists the version.
 
Prashanth Chandra
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
Create a error.jsp page and include the following in your web.xml file. Hope this might be of some help.

<web-app>

<error-page>
<error-code>404</error-code>
<location>/error.jsp</location>
</error-page>

[Here goes your servlet mappings and welcome file lists]

</web-app>
 
shivani anand
Ranch Hand
Posts: 155
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what is location of 404.jsp . Is I need to create error.jsp where should I create one

thanks
SA
 
shivani anand
Ranch Hand
Posts: 155
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I know where to create error.jsp but still I'll like to know where 404.jsp is located as I'll prefer jsu to remove version info from there.

thanks
SA
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic