eclipse启动tomcat访问不到主页
来源:互联网 发布:2016年天猫双十一数据 编辑:程序博客网 时间:2024/05/18 20:11
在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访问主页出错原因?
- StringTokenizer字符串分解
- C++ using关键字作用 (重载父类函数)
- Python 3 中检测QQ在线的脚本
- python 使用Pool,并需要关注结果
- vector的迭代器失效
- eclipse启动tomcat访问不到主页
- 曲线拐点快速寻找算法+C代码
- OC中特有的一些语法
- 获取文件编码
- BUI+Spring+Mybatis
- android之针对fragment多次调用onCreateView的问题
- hdu杭电2199 Can you solve this equation?【二分】
- android开发中获取系统时间方法
- 杭电2141Can you find it?