1

我有以下项目结构:

myproject
- src
- WebContent
   - META-INF
   - WEB-INF
      - jsp
        - index.jsp
      - lib
        - web.xml

如果我的 index.jsp 位于 WebContent 目录下,那么一切都很好,但我希望它与所有其他 jsps 一起位于 WebContent/WEB-INF/jsp 下。我必须添加什么才能做到这一点。

4

2 回答 2

3

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.

于 2009-11-26T06:07:40.347 回答
0

刚刚看到这个问题TomCat 6:欢迎页面可以在WEB-INF里面吗?

看来是做不到了。

于 2009-11-26T06:00:11.593 回答