当前位置: 代码迷 >> Web前端 >> tomcat 直连通过IP访问web项目
  详细解决方案

tomcat 直连通过IP访问web项目

热度:169   发布时间:2012-08-26 16:48:06.0
tomcat 直接通过IP访问web项目

1:在开发时访问web项目是这样的http://localhost:8080/项目名称

也可以直接通过IP访问web项目:http://localhost/项目名称

方法为

? 1:修改tomcat端口为80

??

修改server.xml

?改为

?<Connector port="80" protocol="HTTP/1.1"?
?????????????? connectionTimeout="40000"?
?????????????? redirectPort="8443"? enableLookups="false"? minProcessors="10" maxProcessors="1024" acceptCount="1024" />

?

2:

在server.xml??里,<host>...</host>的标签之间添加<Context path="" docBase="项目名称" debug="0"/>

?

重新启动tomcat,输入http://localhost/项目名称就可以了

?

  相关解决方案