tags:

views:

35

answers:

1

I have an JSP application, it is under server/a/b and WEB-INF is under server/a/b/WEB-INF, not at the app-root directory.

Now I get an error saying the package P does not exisit when visiting server/a/b/index.jsp. Actually the package exists and it is at server/a/b/WEP-INF/classes/P/

I want to know whether the error is due to not-at-root-directory?

Thanks!

+2  A: 

Your server/a/b example is too ambiguous to reasonably answer the question.

At least, it should be the immediate subdirectory of the webapplication context folder. In Tomcat, all webapplications are to be placed in its own folder in the /tomcat/webapps folder where /tomcat is the Tomcat installation folder. The /webapps folder should be already there when you installed Tomcat. Each deployed webapp should be placed in its own folder /webappname which contains the webapplication context which is to be reached by http://hostname:port/webappname.

So, the /WEB-INF folder should be in /tomcat/webapps/webappname/WEB-INF. Not anywhere else. It would contradict the Servlet API specification.

BalusC