>>>  先在web.xml中设置默认页面
<welcome-file-list>
<welcome-file>/login.jsp</welcome-file>
</welcome-file-list>
>>> 再在tomcat安装目录中的conf文件夹中打开server.xml 进行如下设置
<Connector port="80" protocol="HTTP/1.1" 
               connectionTimeout="20000" 
               redirectPort="8443" />
 
 <Host name="localhost"  appBase="webapps"
            unpackWARs="true" autoDeploy="true"
            xmlValidation="false" xmlNamespaceAware="false">
 
        <Context path="" docBase="项目名" reloadable="true" />

 

 
注意:若使用eclipse , 现将eclipse中部署的server打开 执行以下修改 将项目部署到tomcat
[修改前eclipse都是将项目部署到eclipse内部]
 tomcat服务器 去掉端口8080 以及项目名 直接使用IP地址访问

 

 

设置好后  成功访问

tomcat服务器 去掉端口8080 以及项目名 直接使用IP地址访问

 

相关文章:

  • 2022-12-23
  • 2021-11-20
  • 2022-12-23
  • 2022-02-26
  • 2021-10-12
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-12-10
  • 2021-05-18
  • 2021-09-15
  • 2021-06-21
相关资源
相似解决方案