This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Rust Web Development and have Bastian Gruber on-line!
See this thread for details.
Win a copy of Rust Web Development this week in the Other Languages forum!
  • 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
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

Error instantiating servlet class

 
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
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
 
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
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.
 
Tim Holloway
Saloon Keeper
Posts: 24843
174
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.
 
You’ll find me in my office. I’ll probably be drinking. And reading this tiny ad.
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic