且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

tomcat在eclipse中找不到index.jsp

更新时间:2022-03-23 18:37:17

实际上问题是: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!