views:

64

answers:

2

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 with all the other jsps. What do I have to add to do this.

A: 

Just saw this question http://stackoverflow.com/questions/1489219/tomcat-6-can-welcome-page-be-inside-web-inf

Looks like it can't be done.

Ankur
+2  A: 

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.

Roy Tang