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

前端 未结 10 1773
滥情空心
滥情空心 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:03

    You need to use the Port of Tomcat which is by default 8080. So you might want to access you localhost on machine A from machine B as http://A:8080/YourProject And Remember Unlike IIS , it is case sensitive.

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

    As well as blocking the port (see AirSource Ltd's answer), your firewall may have restrictions on the Tomcat service. For example, Mcafee Firewall restricts Tomcat to "outgoing only".

    If using Mcafee, under Change Settings > Firewall, expand Internet Connections for Programs and find Commons Daemon Service Runner (aka tomcat*.exe). Edit it and change Access from Outgoing Only to Incoming and outgoing - Use designated ports (recommended).

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

    Tomcat uses port 8080 by default so you have to provide the port number in the URL to see anything. If it is running http://yourcomputer:8080/app should do the trick.

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

    Step 1: Add a firewall exception to inbound connections to the port that you use for your hosts (the Host tags in CATALINA_HOME(Tomcat dir)/conf/server.xml).

    Step 2: At least in Windows 10, allow Tomcat to communicate through the firewall. One way would be Control Panel -> System and Security -> Windows Firewall -> "Allow an app or feature through Windows Firewall" -> "Change settings" -> Enable Private and Public for "Commons Daemon Service Runner" (if not present: "Allow another app..." -> Chose tomcat#.exe in Tomcat bin directory, where # will be the tomcat version number)

    Step 3: Add a firewall exception for javaw. In Windows 10, that is the steps above up to "Change settings", followed by: Find Java(TM) Platform SE binary with a path to javaw (add as above if not present) -> Enable Private and Public for it.

    Let me know if that does not work. :)

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

    you can use your ip address instead of localhost

    http://10.4.0.1:8080/YourProject

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

    Have you created an exception in your firewall?

    Assuming that Tomcat is running on port 8080 and this is a Windows XP machine, the the firewall will block that port (not the case on Windows Server 2003).

    The firewall can be configured by: choosing the Windows Firewall from the Control Panel, then click on Exceptions -> Add Port and enter name and number: Tomcat, 8080 and leave transport protocol as TCP

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