• 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:
  • Tim Cooke
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Rob Spoor
  • Junilu Lacar
  • paul wheaton
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
  • Scott Selikoff
Bartenders:
  • Piet Souris
  • Jj Roberts
  • fred rosenberger

Error instantiating servlet class

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please help me I just can't find what exactly i'm missing in my code. it's been three days i'm stuck on it. Please look into it. Also when I first wrote this program it was working and later I was facing issue with get method. i.e post was working but get was not working. Now nothing is working.

Servlet Class


web.xml file




HTML Form


Error I'm getting

HTTP Status 500 – Internal Server Error
Type Exception Report

Message Error instantiating servlet class [com.emandi.loginServlet]

Description The server encountered an unexpected condition that prevented it from fulfilling the request.

Exception
javax.servlet.ServletException: Error instantiating servlet class [com.emandi.loginServlet]

Root Cause
java.lang.ClassNotFoundException: com.emandi.loginServlet
 
Rancher
Posts: 4801
50
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How are you compiling and deploying this?
Because that error implies the servlet is not being deployed as part of your app.
 
Deepankar Tiwari
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm using tomcat 9.0 as server in eclipse.
 
Dave Tolls
Rancher
Posts: 4801
50
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Have you tried putting the war into a stand alone tomcat?
I tend not to use the in built launchers in IDEs.
 
Saloon Keeper
Posts: 25620
183
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Dave Tolls wrote:How are you compiling and deploying this?
Because that error implies the servlet is not being deployed as part of your app.



Actually, that message can come when there's an exception thrown by construction code.

I would like to see a stack trace.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic