jboss有個特點,在本機啟動之后,只能在本機的網頁訪問 http://localhost:8080,在其他機器上訪問不了jboss服務。
1.關閉jboss服務端的防火牆
解決方法如下: (dcm4chee 2.13.6 以及以上的版本不需要如下操作)
在目錄jboss-4.2.3.GA\server\default\deploy\jboss-web.deployer下,編輯文件server.xml,
<Connector protocol="HTTP/1.1" port="8080" address="${jboss.bind.address}"
將${jboss.bind.address}改為0.0.0.0就可以了
或者在啟動jboss時加上參數
run -D jboss.bind.address=0.0.0.0
這樣也可以,不用改server.xml
6.0以上版本配置:
在standalone\configuration目錄下的standalone.xml
<subsystem xmlns="urn:jboss:domain:webservices:1.1">
<modify-wsdl-address>true</modify-wsdl-address>
<wsdl-host>${jboss.bind.address:127.0.0.1}</wsdl-host>
<endpoint-config name="Standard-Endpoint-Config"/>
<endpoint-config name="Recording-Endpoint-Config">
<pre-handler-chain name="recording-handlers" protocol-bindings="##SOAP11_HTTP ##SOAP11_HTTP_MTOM ##SOAP12_HTTP ##SOAP12_HTTP_MTOM">
<handler name="RecordingHandler" class="org.jboss.ws.common.invocation.RecordingServerHandler"/>
</pre-handler-chain>
</endpoint-config>
</subsystem>
<subsystem xmlns="urn:jboss:domain:weld:1.0"/>
</profile>
<interfaces>
<interface name="management">
<inet-address value="${jboss.bind.address.management:127.0.0.1}"/>
</interface>
<interface name="public">
<inet-address value="${jboss.bind.address:127.0.0.1}"/>
</interface>
<interface name="unsecure">
<inet-address value="${jboss.bind.address.unsecure:127.0.0.1}"/>
</interface>
</interfaces>
中修改