I was trying to run a servlet program in Tomcat. I placed the compiled a.class file in the directory of WEBAPP/ROOT/WEB-INF/classes, however when I try to run http://localhost/servlet/a, Tomcat can't find the file. How should I set up the Tomcat so that this will work. Thanks in advance.
I had this problem once. Though i dont have a solution, it worked when i put my servlet in a package. Try putting class a in a package. Copy to your classes dir and access via http://localhost/servlet/package.a See if this works. And can some one shed light on why this happens?
I had same problem with Tomcat, putting in package should solve it as mentioned above
Joined: Mar 05, 2003
Hi, Pravin. Thanks for the suggestion. However for my case, seems it doesn't work even if I put the class in a package. Suggested by someone else, I solved the problem by modifying the web.xml. Looks like Tomcat4.1 doesn't support servlet class by calling the full qualified classname. Thanks