Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Help Java H Java httpservlet

Related Tutorials


 
 

Share on Google+Share on Google+

Java httpservlet

Advertisement
HttpServlet class is an abstract class defined in "javax.servlet.http" package and is sub class of GenericServlet

Java httpservlet

     

HttpServlet class is an abstract class defined in "javax.servlet.http" package and is sub class of GenericServlet class defined in "javax.servlet" package. GenericServlet class is used to define a generic, protocol-independent servlet but HttpServlet class provides an HTTP protocol specific implementation. If your servlet has to work with HTTP protocol then your servlet needs to extend HttpServlet class. This class provides various doXXX() methods which can be overridden according to the type of request. This class also provides service() methods that can also be overridden but we don't need to do so because it calls the appropriate doXXX() method according to the method of request. Generally, doGet() or doPost() methods are needed to be overridden to handle the GET or POST requests.

 

Advertisements

If you enjoyed this post then why not add us on Google+? Add us to your Circles



Liked it!  Share this Tutorial


Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.

Posted on: November 11, 2009

Related Tutorials

Discuss: Java httpservlet  

Post your Comment


Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 
Comments:0
DMCA.com