Paul
Paul

Reputation: 608

local tomcat with eclipse attempt to run jsp

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

Answers (2)

Elliott Frisch
Elliott Frisch

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

Andres
Andres

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

Related Questions