aspose file tools*
The moose likes Tomcat and the fly likes disable tomcat version display Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "disable tomcat version display" Watch "disable tomcat version display" New topic
Author

disable tomcat version display

shivani anand
Ranch Hand

Joined: Dec 28, 2000
Posts: 155
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

Joined: Mar 14, 2001
Posts: 1902

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.


Theodore Jonathan Casser
SCJP/SCSNI/SCBCD/SCWCD/SCDJWS/SCMAD/SCEA/MCTS/MCPD... and so many more letters than you can shake a stick at!
Prashanth Chandra
Ranch Hand

Joined: Dec 07, 2005
Posts: 79
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

Joined: Dec 28, 2000
Posts: 155
what is location of 404.jsp . Is I need to create error.jsp where should I create one

thanks
SA
shivani anand
Ranch Hand

Joined: Dec 28, 2000
Posts: 155
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
 
Don't get me started about those stupid light bulbs.
 
subject: disable tomcat version display