• 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

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: 27884
198
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.
 
WHAT is your favorite color? Blue, no yellow, ahhhhhhh! Tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic