> > Is it possible to programmatically change the Server header? > > Barring that, is it possible to set a Server header for a servlet > > within its web.xml file? My least preferred method is to change the Server > > header within Tomcat's server.xml file. > I was thinking that a javax.servlet.Filter which intercepts a > call to set an HTTP header would do the trick. I wrote a > naive Filter (listed below) and added parameters to my > web.xml (also shown below) to accomplish this. Its > init() and doFilter() methods are called, but the setHeader() > method of the HttpServletResponseWrapper is never hit.
I also overrode the addHeader() method and added a call to that within my servlet. The addHeader() method in the wrapper gets called, but only when that method is called within the servlet, not from within Tomcat. Surely there is a way to alter the Server header of an HTTP response, if only for security reasons. I can't be the only person who wishes to do this. I would appreciate any suggestions as to how this can be accomplished. thank you, Ian. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
