Reputation: 608
I have local tomcat running. I have eclipse loading contexts to this tomcat instance.
I have a jsp under webappl, which I redirect to in servlet, and which I can access at :8080/mywebapp/my.jsp.
If I create a directory under webappl/alljsps , and move my.jsp to this location webappl/alljsps/my.jsp, I can not redirect, and I can not access at :8080/mywebapp/alljsps/my.jsp.
What steps are required to access this moved jsp?
Upvotes: 0
Views: 86
Reputation: 201447
You need to serve it with a Servlet, the container will not serve JSP files under WEB-INF directly (that's usually the point). Instead, you would usually use a RequestDispatcher
to include()
it.
Upvotes: 0
Reputation: 10717
You can only access jsps under WEB-INF if you redirect to them through a servlet. Nothing on WEB-INF can be accessed directly.
Upvotes: 1