tomcat在eclipse中找不到index.jsp [英] tomcat not finding index.jsp in eclipse
问题描述
我对 eclipse-tomcat-maven 非常陌生,我在配置它们时遇到了一些严重的问题.
I am very new to eclipse-tomcat-maven, and I am having some serious problems with configurating them.
我从 eclipse->new project->maven project->mvn-archerype-webapp 创建了一个简单的 webapp,带有一个简单的 Hello world,但是当我选择我的项目并在服务器上运行它时,我收到以下消息:HTTP 状态 404 请求的资源不可用.
I create a simple webapp from eclipse->new project->maven project-> mvn-archerype-webapp, with a simple Hello world, but when I select my project and run it on server I get the following message: HTTP Status 404 The requested resource is not available.
我尝试了大量故障排除,例如将服务器位置更改为用户 Tomcat 安装",或将服务器 HTTP/1.1 端口从 8080 更改为 8088 并再次更改为 8080,重新启动 eclipse 和 pc,以及许多其他工作人员,但没有任何作用.
I have tried a significant amount of troubleshooting such as changing the server location to "User Tomcat Installation", or changing the server HTTP/1.1 port from 8080 to 8088 and again to 8080, restarting eclipse and pc, and lots of other staff but nothing works.
我正在使用 eclipse Juno 和 apache tomcat 6.0.tomcat 服务器启动正常,但找不到 index.jsp 页面.
I am using eclipse Juno and apache tomcat 6.0. The tomcat server is starting just fine but it doesn't find the index.jsp page.
我将不胜感激,因为老实说我迷路了,除非我解决了这个问题,否则我无法继续工作我的 jsp 页面.
I would appreciate any help, because I am honestly lost and I cannot continue to work my jsp pages, unless I solve this problem.
推荐答案
实际上问题是:Eclipse 会自动配置与我在工作 IDE 中所拥有的文件夹结构不同的文件夹结构.更详细地说:我的工作文件夹结构是:src/main/webapp/WEB-INF 和 src/main/webapp/index.jsp而在home Eclipse 中自动把所有的jsp 页面,放到一个名为WebContent 的新文件夹中!因此,当我的项目设置为在 WebContent/... 下查找 index.jsp 时,它在 webapp 文件夹下搜索,因此没有找到任何 index.jsp 页面.
Actually the problem was: Eclipse is automatically configuring a different folder structure than the one I had in my work IDE. In more details: my work folder structure was: src/main/webapp/WEB-INF and src/main/webapp/index.jsp While in home Eclipse automatically put all of the jsp pages, into a new folder called WebContent! So while my project was set to find the index.jsp under the WebContent/... it searched under the webapp folder, and thus did not find any index.jsp page.
我无意中发现,在搜索了几天之后,当我点击窗口右侧的我的项目->属性->项目构面->动态 Web 模块->可用的进一步配置.
I accidentally discovered that, after searching for days, when I clicked on myproject->properties->project facets->Dynamic Web Module->Further Configuration Available, down on the right of the window.
进一步的配置可用"只能显示您第一次导入项目!我花了很多天试图找出问题所在,所以我想分享一下,以防其他人遇到同样的问题!
The "Further Configuration Available" can only display the FIRST time you import a project! I' ve spent a lot of days trying to find out what was wrong, so I'd like to share it in case someone else has the same problem!
这篇关于tomcat在eclipse中找不到index.jsp的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!