我有以下项目结构:
myproject
- src
- WebContent
- META-INF
- WEB-INF
- jsp
- index.jsp
- lib
- web.xml
如果我的 index.jsp 位于 WebContent 目录下,那么一切都很好,但我希望它与所有其他 jsps 一起位于 WebContent/WEB-INF/jsp 下。我必须添加什么才能做到这一点。
我有以下项目结构:
myproject
- src
- WebContent
- META-INF
- WEB-INF
- jsp
- index.jsp
- lib
- web.xml
如果我的 index.jsp 位于 WebContent 目录下,那么一切都很好,但我希望它与所有其他 jsps 一起位于 WebContent/WEB-INF/jsp 下。我必须添加什么才能做到这一点。
The contents of WEB-INF aren't publicly accessible resources, why are you putting the other jsps there? Are those other jsps accessible?
If you want to hide the index.jsp, create a servlet mapped to the root path and have it forward to index.jsp.
刚刚看到这个问题TomCat 6:欢迎页面可以在WEB-INF里面吗?
看来是做不到了。