Home Help Java H Java httpservlet



Java httpservlet
Posted on: November 11, 2009 at 12:00 AM
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.

 

Related Tags for Java httpservlet:


More Tutorials from this section

Ask Questions?    Discuss: Java httpservlet  

Post your Comment


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

Ask Questions?

If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.

Ask your questions, our development team will try to give answers to your questions.