1 Reply Latest reply on Nov 18, 2009 2:58 AM by jaikiran

    How to remove or modify JBOSS's HTTP response headers (

    soonthor

      Hi,

      Is it possible to remove or modify JBOSS's HTTP response headers ("Server", "X-Powered-By", "Date")?

      My main requirement is to reformat "Date" header and remove some other headers.

      I have tried
      response.setHeader("Date","<My date format>").

      It didn't help.

      I also tried to implement javax.servlet.Filter by passing my own HttpServletResponseWrapper to filterChange.doFilter(). My HttpServletResponseWrapper override setHeader( ), setDateHeader( ) and other methods. However, I don't see any code call them to set those headers. At what point JBOSS actually set those headers? Is it done after Filter.doFilter? Is there a way I can override the behavior?

      Any help would be really appreciated.

      Thank you,
      Soonthorn A.