开发者

How do I change the location of index.jsp in a war file

开发者 https://www.devze.com 2022-12-13 01:29 出处:网络
I have the following project structure: myproject - src - WebContent    - META-INF    - WEB-INF

I have the following project structure:

myproject

- src

- WebContent

   - META-INF

   - WEB-INF

      - jsp

        - index.jsp

      - lib

        - web.xml

If my index.jsp comes under the WebContent directory then all is well, but I want it to be under WebContent/WEB-INF/jsp wi开发者_开发知识库th all the other jsps. What do I have to add to do this.


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.


Just saw this question TomCat 6: can welcome page be inside WEB-INF?

Looks like it can't be done.

0

精彩评论

暂无评论...
验证码 换一张
取 消