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

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

问题描述

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

解决方案

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"

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

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.

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.

Good luck!

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

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