如何从另一台计算机访问Tomcat? [英] How to access Tomcat from another computer?

查看:757
本文介绍了如何从另一台计算机访问Tomcat?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个JSP网站,我想与我的朋友分享.我们所有人都使用相同的互联网资源.我们有一个通用的静态IP:49.204.14.98(我的公共IP).我们几乎有40位用户共享同一资源.我的IP地址为192.168.0.120.当我尝试连接到192.168.0.120时,它无法连接.请建议我如何使我的服务器可被其他PC访问.

I have an JSP website which I want to share with my friends. We all are using a same internet resource. We have a common static IP:49.204.14.98(My Public IP). We are almost 40 users sharing the same resource. I have IP something as 192.168.0.120. When I try connecting to 192.168.0.120 it is not able to connect. Please suggest me how to make my server accessible to other PCs.

我不是管理员,也无权访问路由器设置.

I am not the administrator and I don't have access to the router settings.

我看到了此链接链接,但与我的问题无关

I saw this link link but it is not related to my problem

推荐答案

就像@ informatik01写道:如果您所有的朋友都与您(并说他们)在同一个LAN(局域网)上,可以使用上述URL访问您的Web应用程序. http://192.168.0.120:8080/Your_App_Name/some_path/some_file.jsp"

Like @informatik01 wrote, "If all your friends are on the same LAN (Local Area Network) as you are (and you say they are), the they can access your web application using the above URL. http://192.168.0.120:8080/Your_App_Name/some_path/some_file.jsp"

您正在使用什么操作系统?您对$CATALINA_HOME/conf中的server.xml进行了任何更改吗?

What OS are you using? Have you made any changes to server.xml in $CATALINA_HOME/conf?

首先尝试在本地访问,然后从您的一台朋友计算机上尝试. 如果然后失败,请尝试在与运行tomcat实例的同一台计算机上关闭防火墙.根据其配置,它可能会阻止默认端口8080上的传入连接.如果这是问题所在,请重新激活防火墙并为HTTP通信打开所需的端口8080.

Try accessing it locally first, then try it from one of your friends computers. If it then fails, try and shutdown the firewall on the same machine as is running the tomcat instance. Depending on its configuration it may prevent incoming connections on the default port 8080. If that was the issue, reactivate the firewall and open the desired port 8080 for http traffic.

了解日志,它们通常位于$CATALINA_HOME/logs/中,例如,查看catalina.out.如果您不确定天气如何,则服务器是否已启动且无法运行,并且可能出现任何问题,那么这就是检查的最佳位置.它将在其中说明找到的Web应用程序以及是否成功部署了这些Web应用程序.您也可以使用浏览器在localhost:8080转到服务器根目录,并检查是否显示欢迎屏幕.

Get to know the logs, they are usually located in $CATALINA_HOME/logs/, have a look in catalina.out for example. If you´re unsure weather the server is up and running or not and whatever issues may´ve arisen, thats the best place to check. There it will state which webapps it finds and if it was successfull in deploying them. You can also go to the server root with your browser at localhost:8080 and check if you get the welcome screen.

祝你好运!

这篇关于如何从另一台计算机访问Tomcat?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆