How can I browse my Tomcat localhost from another computer on the network?

前端 未结 10 1774
滥情空心
滥情空心 2020-12-31 01:30

I\'m an IIS guy and know its as simple as just using the http://[computername]/path to webapp.. however, I can\'t seem to figure out how to make this possible for a JSP appl

相关标签:
10条回答
  • 2020-12-31 02:18

    this works fine simply write http://your_ipaddress:8080(tomcat server port)/project name

    and make sure you are connected to same network and project is deployed on tomcat.

    0 讨论(0)
  • 2020-12-31 02:21

    You must write your machine's IP instead of using "localhost"

    0 讨论(0)
  • 2020-12-31 02:23

    if your ip were 192.122.11.22 you have to write http://192.122.11.22:8080/proyectname (if dont, then look your firewall)

    0 讨论(0)
  • 2020-12-31 02:25

    `Step 1: Go to directory where tomcat is installed and look for server.xml file.Usually the path is

    C:\Program Files\Apache Software Foundation\Tomcat 9.0\conf\server.xml

    Open it with editor and look for connector block.It will be like

    <Connector port="8080" protocol="HTTP/1.1"
                   connectionTimeout="20000"
                   redirectPort="8443"/>
    

    Add address="0.0.0.0" to it

    <Connector port="8080" protocol="HTTP/1.1"
                   connectionTimeout="20000"
                   redirectPort="8443"
                   address="0.0.0.0" />
    

    save the file.

    step 2: Go to the firewall and network protection setting of the pc and turn off the public network firewall.

    step 3: Start the tomcat server.Then use the local ip address of pc and port 8080 (used by tomcat server as default unless you have changed it) form other device to connect with the tomcat server on the pc.

    eg - http://192.168.8.137:8080/ (replace 192.168.8.137 with your pc's local ip address)

    0 讨论(0)
提交回复
热议问题