• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

disable tomcat version display

 
Ranch Hand
Posts: 155
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 1902
Hibernate Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Legend has it that if you rub the right tiny ad, a genie comes out.
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic