Java httpservlet

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

Ads

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

Share on Google+Share on Google+

Java httpservlet

Posted on: November 11, 2009 If you enjoyed this post then why not add us on Google+? Add us to your Circles

Advertisements

 

Discuss: Java httpservlet  

Post your Comment


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

Ads

 

Ads