在8080端口上部署Web应用程序

时间:2021-07-08 18:13:38

I created a web application using eclipse tomcat and mysql. I would access my website on 'localhost:8080/HotelPromo' Then I got a no-ip account and got a domain hotelpromo.no-ip.biz, and in no-ip this is pointing to my IP address(which I can ping).

我使用eclipse tomcat和mysql创建了一个Web应用程序。我会在'localhost:8080 / HotelPromo'访问我的网站然后我有一个no-ip帐户并且有一个域名hotelpromo.no-ip.biz,并且在no-ip中这指向我的IP地址(我可以ping通)。

I thought I would be able to access my web application using hotelpromo.no-ip.biz:8080/HotelPromo, but it's not working.

我以为我可以使用hotelpromo.no-ip.biz:8080/HotelPromo访问我的网络应用程序,但它无法正常工作。

Is it because I'm trying to use the port 8080? If yes, where and How should I change that?

是因为我正在尝试使用端口8080吗?如果是的话,我应该在哪里以及如何改变它?

2 个解决方案

#1


The problem may be with the port. Make sure it's open on your router. You can check if the port is open on this site: https://www.site24x7.com/port-test.html

问题可能出在端口上。确保它在路由器上打开。您可以检查此站点上的端口是否已打开:https://www.site24x7.com/port-test.html

#2


I don't know weather my suggested answer is going to solve this problem or not(it might), but it might be helpful to you

我不知道天气我建议的答案是否会解决这个问题(可能),但它可能对你有所帮助


Accessing hotelpromo.no-ip.biz instead of hotelpromo.no-ip.biz:8080/HotelPromo

访问hotelpromo.no-ip.biz而不是hotelpromo.no-ip.biz:8080/HotelPromo

  1. Open server.xml (ProjectExplorer|Navigator > Servers > Tomcat v7.0 Server at localhost-config - Servers > server.xml)
  2. 打开server.xml(ProjectExplorer | Navigator>服务器> tomcat v7.0服务器,位于localhost-config - Servers> server.xml)

  3. Accessing localhost/HotelPromo instead localhost:8080/HotelPromo

    访问localhost / HotelPromo而不是localhost:8080 / HotelPromo

    change

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

    to

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

  4. Now, accessing localhost instead localhost/HotelPromo

    现在,访问localhost而不是localhost / HotelPromo

    change

    <Context docBase="HotelPromo" path="/HotelPromo" reloadable="true" source="org.eclipse.jst.jee.server:HotelPromo"/>

    to

    <Context docBase="HotelPromo" path="/" reloadable="true" source="org.eclipse.jst.jee.server:HotelPromo"/>


NOTE: You can replace the localhost with hotelpromo.no-ip.biz when accessing through web

注意:通过Web访问时,您可以将localhost替换为hotelpromo.no-ip.biz

Image Links

step 1

step 2 and 3

第2步和第3步

#1


The problem may be with the port. Make sure it's open on your router. You can check if the port is open on this site: https://www.site24x7.com/port-test.html

问题可能出在端口上。确保它在路由器上打开。您可以检查此站点上的端口是否已打开:https://www.site24x7.com/port-test.html

#2


I don't know weather my suggested answer is going to solve this problem or not(it might), but it might be helpful to you

我不知道天气我建议的答案是否会解决这个问题(可能),但它可能对你有所帮助


Accessing hotelpromo.no-ip.biz instead of hotelpromo.no-ip.biz:8080/HotelPromo

访问hotelpromo.no-ip.biz而不是hotelpromo.no-ip.biz:8080/HotelPromo

  1. Open server.xml (ProjectExplorer|Navigator > Servers > Tomcat v7.0 Server at localhost-config - Servers > server.xml)
  2. 打开server.xml(ProjectExplorer | Navigator>服务器> tomcat v7.0服务器,位于localhost-config - Servers> server.xml)

  3. Accessing localhost/HotelPromo instead localhost:8080/HotelPromo

    访问localhost / HotelPromo而不是localhost:8080 / HotelPromo

    change

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

    to

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

  4. Now, accessing localhost instead localhost/HotelPromo

    现在,访问localhost而不是localhost / HotelPromo

    change

    <Context docBase="HotelPromo" path="/HotelPromo" reloadable="true" source="org.eclipse.jst.jee.server:HotelPromo"/>

    to

    <Context docBase="HotelPromo" path="/" reloadable="true" source="org.eclipse.jst.jee.server:HotelPromo"/>


NOTE: You can replace the localhost with hotelpromo.no-ip.biz when accessing through web

注意:通过Web访问时,您可以将localhost替换为hotelpromo.no-ip.biz

Image Links

step 1

step 2 and 3

第2步和第3步