eclipse启动tomcat访问不到主页,可以访问工程
来源:互联网 发布:天庭淘宝店 宁小北txt 编辑:程序博客网 时间:2024/06/04 23:14
在eclipse中配置好tomcat后访问不到主页,而访问自己建的项目时则能访问到,问题原因何在?
查阅了相关资料后得知 在eclipse中启动tomacat后,它去启动的web项目并不是tomcat文件夹下的webapp下web工程,而是eclipse中自己的一个文件夹下的web工程。
双击tomcat服务器,打开tomcat的配置页面,如图所示:
(注:此图的server Location需要在tomcat服务器中没有部署web项目时才时enable的)
图中时选择server path 和 location path。 可以看到默认的情况是“使用workspace的metadata”,也就是server path时workSpace下的,具体的path为:{workspace}\.metadata\.plugins\org.eclipse.wst.server.core\tmp0 , (new一个服务器,就会有个temp,第一个服务器就是temp0) Deploy path为wtpwebapps。 查看此文件夹,里面没有tomcat的webapp下的ROOT工程,所以当然访问不到tomcat的主页啦~~
解决方法:
1.把tomcat下的webapp下的ROOT复制到E:\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0 下的wtpwebapps中,再重启tomcat,此时就能访问到主页了
2.在配置server locations时,选择第二项,“user tomcat installation” 修改配置如下图:
注 : 配置了这一步那么在Eclipse的workspace里面开发的项目当启动Tomcat服务器时同时也会拷贝到所选择的Deploy Path中。
- eclipse启动tomcat访问不到主页,可以访问工程
- eclipse启动tomcat访问不到主页
- eclipse启动tomcat访问不到主页
- eclipse启动tomcat访问不到主页
- eclipse启动tomcat访问不到主页
- eclipse启动tomcat访问不到主页
- eclipse启动tomcat访问不到主页
- eclipse启动tomcat访问不到主页
- eclipse启动tomcat访问不到主页
- eclipse启动tomcat访问不到主页
- eclipse启动tomcat访问不到主页
- eclipse启动tomcat访问不到主页
- eclipse启动tomcat访问不到主页
- eclipse启动tomcat访问不到主页
- eclipse启动tomcat访问不到主页
- eclipse启动tomcat访问不到主页
- eclipse启动tomcat访问不到主页
- eclipse启动了tomcat,浏览器可以访问tomcat下的项目但不能访问tomcat主页
- LintCode-第k个排列
- WebService(4)——WSDL文档解析
- 判断是不是闰年问题
- 关于计算机基础常识
- 对string文件名路径中获取文件名函数方法
- eclipse启动tomcat访问不到主页,可以访问工程
- leetcode-Convert Sorted Array to Binary Search Tree
- JAVA设计模式(16):行为型-策略模式(Strategy)
- CSS3属性笔记(七)
- git从创建到使用的一些简单命令
- linux下rm命令改造成将文件移动至回车站
- WebService(5)——一个webService请求的流程
- adb install命令没反应 只有光标显示
- UVA LA3218 找边界,PSLG