Java localhost:8080/lio/在我的apachtomcat中非常有效。但当我把<;我的ip>;:8080/lio/i获取错误

Java localhost:8080/lio/在我的apachtomcat中非常有效。但当我把<;我的ip>;:8080/lio/i获取错误,java,eclipse,apache,tomcat,Java,Eclipse,Apache,Tomcat,localhost:8080/lio/在我的ApacheTomcat中工作得很好,但是当我使用106.5x.xx.xx:8080/lio/时,我得到以下错误: The connection has timed out The server at 106.5x.xx.xx is taking too long to respond. The site could be temporarily unavailable or too busy. Try again in a few mom

localhost:8080/lio/
在我的ApacheTomcat中工作得很好,但是当我使用
106.5x.xx.xx:8080/lio/
时,我得到以下错误:

The connection has timed out

The server at 106.5x.xx.xx is taking too long to respond.

    The site could be temporarily unavailable or too busy. Try again in a few moments.
    If you are unable to load any pages, check your computer's network connection.
    If your computer or network is protected by a firewall or proxy, make sure that Firefox is permitted to access the Web. 

在你的评论中,你说你使用whatsmyip.com作为你的IP地址。这是您的路由器公共IP地址,而不是从您的电脑。要从您的电脑获取IP,请执行以下操作

在Windows上:

ipconfig
在Linux上(需要root权限):


当然,您只能通过这种方式从本地网络访问tomcat。如果您想从internet访问您的电脑,您必须在路由器上设置端口转发(如果支持)。

您是如何获得IP的?它可能与以下内容重复。[LNIK][1][1]:我从whatsmyip.com获得我的ip。其差异question@user3564100这是你的问题。这是你的路由器的IP,不是你的电脑。请告诉我你的详细信息portforwarding@user3564100我不能。您必须查阅路由器的特定手册。也不是每个路由器都支持它。就像我上面说的。请阅读路由器的手册,也许它支持端口转发,然后您可以使用路由器的公共IP。我的路由器支持端口转发。你能给我举个例子吗?我不知道它对你的路由器是如何工作的,因为它对每个人都是不同的。如果手册中没有准确描述,您可以询问以下问题:
ifconfig