• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Cannot load the servlet class

 
lokesh rajarathnam
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi every one...


The error "Cannot load the servlet class : <package>.loginservlet"

How to overcome this prob...

I think the .class file is missing or cannot created...

What could be the prob....?
[ July 14, 2008: Message edited by: Bear Bibeault ]
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Did you want to share first?

Where is the class file located? is it located at <context>/WEB-INF/classes/<package>/LoginServlet

(note the capitalisation in the class name, by convention this is preferred and encouraged rather than all lower case)
 
lokesh rajarathnam
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi David...

the project... <project name>/src/<package>/loginservlet.java

after deploying this i get "ClassNotFoundException" (error 500,)
and Internal problem occur.
Later i add servlet-api.jar to my project lib folder... then also the same problem....

what can i do... ? How to over come...?
 
lokesh rajarathnam
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by lokesh rajarathnam:
Hi David...

the project... <project name>/src/<package>/loginservlet.java

after deploying this i get "ClassNotFoundException" (error 500,)
and Internal problem occur.
Later i add servlet-api.jar to my project lib folder... then also the same problem....

what can i do... ? How to over come...?
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Did you compile your servlet source to create a class file?
 
sudhir nim
Ranch Hand
Posts: 212
Eclipse IDE Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Look at Web application directory structure. It explains where to put the compiled classes and JAR files.

Make sure that the class file is inside WEB-INF/classes directory.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic