• Post Reply Bookmark Topic Watch Topic
  • New Topic

tomcat doesn't see servlet  RSS feed

 
galina bloch
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please help: crete simpleservelt using eclipse/tomcat. I was able successfully create jsp.
java.lang.ClassNotFoundException: SimpleServlet
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66156
146
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You're going to need to give use a lot more information than that. How did you set up the servlet? Where did you put the class file? How did you declare and map it in the deployment descriptor?
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Be sure to put your servlet class in a package, use the package in the deployment descriptor and put the compiled class file under the WEB-INF/classes directory using the package name. Not putting all classes used in servlets and jsp is a major cause of beginner problems.

Also, please mention the java version plus the Tomcat version and how it was installed.

Bill
 
Rahul Bhattacharjee
Ranch Hand
Posts: 2308
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
while putting the compiled classes in the classes directory make sure that you follow the package-directory discpline.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!