How to configure jboss EAP 6.4 differently for different applications running on it?

130 Views Asked by At

I have a 4 applications running on my jboss server, i want to disable "X-PoweredBy" header response for particular application. if i run the shell script and try to change it, it will be applicable for all the instances on the server. How do i do it for one application alone ?

1

There are 1 best solutions below

0
Panagiotis Chavariotis On

Try to create a servlet filter for the application you are interested! To be specific, you must call HttpServletResponse#setHeader(name, value) or the HttpServletResponse#addHeader(name, value). Bear in mind that this can not override the header added by the web container but this can add the header if the web container does not add the same header.