开发者

Jsp Servlet Tomcat 6 Error - Unable to Load Servlets

This problem is intermittant and occurs every few times I try to connect to my web app from a client machine.

The jsp pages loads fine, any code within it executes fine, but as soon as I submit a form to a servlet, it cannot find the servlet.

Yet when on the server itself I can run the full application from netbeans with no problem, also I can run the full application on the server under IE7, no problems.

Any external connec开发者_开发问答tion can see the web pages but falls over on accessing a servlet.

As far as I am concerned everything seems to be in place, servlet libs are in both jdk/jre libs, the classpath is correct.

As a further test I created a new virtual server, installing netbeans, tomcat6 and copying over the original files and the same issue occurs.


servlet libs are in both jdk/jre libs

This is a very, very bad idea. The servlet libs are in essence already provided by the servletcontainer itself. In case of for example Tomcat, it's present in its /lib folder. When you manually put servlet libs of a different servletcontainer make/version in JDK/JRE libs, then I won't be surprised if the webapp start to behave like that.

At any way, get rid of servlet libs in JDK/JRE libs. Even more, you should never touch those libs. If you did it because you got compilation errors on missing javax.servlet imports when compiling servlets, then you should have solved it differently: specify the Tomcat/lib/* in the compiletime classpath.


Where did you learn about developing servlets? Did you read Roseindia tutorials or something? I'd suggest to put aside the book/tutorial you have used and continue with decent books/tutorials. You can find useful links at bottom of our Servlets info page.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜