Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Problem running a sample Servlet Example: HTTP 503 Status code

 
prad argum
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
can anyone help me whats going wrong with the following example:
I have a form.html page in webapps/chapter01 directory
:

This on submitting performs POST Action: on TestServlet. TestServlet.java code is in web-inf classes directory along with its class file

My web.xml descriptor is as follows:

when i press the submit button in the form.html i get the following error:
HTTP Status 503 - Servlet TestServlet is currently unavailable
can anyone help me with this...
thanks
pradgum
 
prad argum
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Got it solved...
i dint extend the HttpServlet class
thanks any way
pradgum
 
Fisher Daniel
Ranch Hand
Posts: 582
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes.. your servlet class should be extends HttpServlet...
daniel
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!