Access JAVA web application from other machines

0

I'm using JAVA, JPA, with Wildfly, and primefaces. I have the link from my application link I would like other machines to access this application, I have already modified the localhost for the IP of my machine but it did not work, is there something specific to do?

    
asked by anonymous 07.10.2016 / 15:24

2 answers

1

The correct thing is to configure a new interface called any to any address, eg:

<interface name="any">
    <any-address/>
</interface>

and specify it as default in the socket biding group, eg:

 <socket-binding-group name="standard-sockets" default-interface="any" port-offset="${jboss.socket.binding.port-offset:0}">
        <socket-binding name="management-http" interface="management" port="${jboss.management.http.port:9990}"/>
        <socket-binding name="management-https" interface="management" port="${jboss.management.https.port:9993}"/>
        <socket-binding name="ajp" port="${jboss.ajp.port:8009}"/>
        <socket-binding name="http" port="${jboss.http.port:8080}"/>
        <socket-binding name="https" port="${jboss.https.port:8443}"/>
        <socket-binding name="txn-recovery-environment" port="4712"/>
        <socket-binding name="txn-status-manager" port="4713"/>
        <outbound-socket-binding name="mail-smtp">
            <remote-destination host="localhost" port="25"/>
        </outbound-socket-binding>
    </socket-binding-group>
    
07.10.2016 / 19:17
0

In wildfly, go to standalone.xml (or domain.xml, it depends on which script you use to upload the server), and change the line below:

From:

<interface name="public">
    <inet-address value="${jboss.bind.address:127.0.0.1}"/>
</interface>

To:

<interface name="public">
    <inet-address value="${jboss.bind.address:0.0.0.0}"/>
</interface>
    
07.10.2016 / 16:45