• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Cannot load the servlet class

 
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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...?

 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Did you compile your servlet source to create a class file?
 
Ranch Hand
Posts: 212
Eclipse IDE Spring Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic