我正在使用JBoss 7.1.1。最后。我想从服务器响应标头中删除“ Apache-Coyote / 1.1”和“ JSP / 2.2”。
我尝试了以下方法,但没有解决。
1)Set following code in standalone.conf.bad file.
set "JAVA_OPTS=%JAVA_OPTS% -Dorg.apache.coyote.http11.Http11Protocol.SERVER=Something"
2)Make changes in the standalone.xml file.
<subsystem xmlns="urn:jboss:domain:web:1.1"
default-virtual-server="default-host" native="false">
<configuration>
<jsp-configuration development="true" x-powered-by="false" display-source-fragment="false"/>
</configuration>
.............
</subsystem>
3)Lastly, I did combine all things
3.1) Modify standalone.xml like below
<subsystem xmlns="urn:jboss:domain:web:1.1"
default-virtual-server="default-host" native="false">
<configuration>
<jsp-configuration development="true" x-powered-by="false" display-source-fragment="false"/>
</configuration>
.............
</subsystem>
3.2)Go to jboss-as-7.1.1.Final/modules/org/jboss/as/web/main
Place the JBoss-as-web-7.1.1.Final-RECOMPILE.jar in there. You can download from [http://www.datafilehost.com/download-2cb9ff04.html][1]
3.3) Open module.xml (jboss-as-7.1.1.Final/modules/org/jboss/as/web/main) and add the following line
<!--resource-root path="jboss-as-web-7.1.1.Final.jar"/-->
<resource-root path="jboss-as-web-7.1.1.Final-RECOMPILE.jar"/>
But still, I am able to see below things in Fiddler.
JBoss Web/7.0.13.Final
Apache-Coyote/1.1
JSP/2.2