what is diff between generic servlets and httpservlets

Ads
 

what is diff between generic servlets and httpservlets

what is diff between generic servlets and httpservlets

View Answers

May 7, 2012 at 3:36 PM

Difference between GenericServlet and HTTPServlet:

1)GenericServlet belongs to javax.servlet package while HttpServlet belongs to javax.servlet.http package.

2)GenericServlet is an abstract class which extends Object and implements Servlet, ServletConfig and java.io.Serializable interfaces. HTTPServlet is an abstract class which extends GenericServlet and implements java.io.Serializable.

3)The direct subclass to GenericServlet is HttpServlet. To write a GenericServlet you need abstract service() to be overridden. A subclass of HttpServlet must override at least one method of doGet(), doPost(),doPut(), doDelete(), init(), destroy(), getServletInfo().

4)GenericServlet is a protocol-independent servlet while HTTPServlet is a protocol dependent servlet.

Ads









Related Tutorials/Questions & Answers:
the servlets
what is diff between generic servlets and httpservlets  what is diff between generic servlets and httpservlets   Difference between GenericServlet and HTTPServlet: 1)GenericServlet belongs to javax.servlet package
Diff between ArrayList and Vector?
Diff between ArrayList and Vector?  What's The Difference between ArrayList and Vector Classes and Can you give me a simple Program for set and List Interface
Advertisements
diff between encapsulation and abstraction code
diff between encapsulation and abstraction code  diff between encapsulation and abstraction code
diff between encapsulation and abstraction code with output
diff between encapsulation and abstraction code with output   diff between encapsulation and abstraction code with output
diff between encapsulation and abstraction code with output
diff between encapsulation and abstraction code with output   diff between encapsulation and abstraction code with output
diff between encapsulation and abstraction code with output
diff between encapsulation and abstraction code with output   diff between encapsulation and abstraction code with output
ModuleNotFoundError: No module named 'what-the-diff'
ModuleNotFoundError: No module named 'what-the-diff'  Hi, My... 'what-the-diff' How to remove the ModuleNotFoundError: No module named 'what-the-diff' error? Thanks   Hi, In your python
What is the difference between the >> and >>> operators?
What is the difference between the >> and >>> operators?   hi, What is the difference between the >> and >>> operators? Thanks
what is the difference between extends and implements
what is the difference between extends and implements  difference between extends and implements
what is the difference between extends and implements
what is the difference between extends and implements  difference between extends and implements
what is the Difference between weblogic and jboss?
what is the Difference between weblogic and jboss?  what is the Difference between weblogic and jboss
What is the difference between hibernate and spring
What is the difference between hibernate and spring  Hi, What is the difference between hibernate and spring. Thanks
what is the difference between pop and oop
what is the difference between pop and oop  what is the difference between pop and oop
What are the differences between EJB and Spring
What are the differences between EJB and Spring   Hi, What are the differences between EJB and Spring Thanks
What is the difference between $message and $$message?
What is the difference between $message and $$message?  What is the difference between $message and $$message
What is the difference between a constructor and a method?
What is the difference between a constructor and a method?  Hi, What is the difference between a constructor and a method?   Hi, I have found a good link of Java program related to difference between constructor
What is difference between Path and Classpath?
What is difference between Path and Classpath?   hi What is difference between Path and Classpath? thanks   Hi, The Path & Classpath are used for operating system level environment variales. We mostly use Path
What is the difference between a JDK and a JVM?
What is the difference between a JDK and a JVM?  Hi, What is the difference between a JDK and a JVM? Thanks,   Hi, JDK is stand... to compile your source files using a JVM. For more difference between JDK and JVM
What is the difference between JPA and Hibernate?
What is the difference between JPA and Hibernate?  Hi, I have seen... it for enterprise applications and there is good demand in market. What is the difference between JPA and Hibernate? What a beginner should learn? Thanks   Hi
what is the difference between distributed application and web application?
what is the difference between distributed application and web application?  what is the difference between distributed application and web application
What’s the difference between load() and get()?
What?s the difference between load() and get()?   Hi, What?s the difference between load() and get()? thanks
What is difference between singleton and prototype bean?
What is difference between singleton and prototype bean?  Hi, What is difference between singleton and prototype bean? Thanks
What is the difference between JSF, Servlet and JSP?
What is the difference between JSF, Servlet and JSP?  What is the difference between JSF, Servlet and JSP
what is the difference between productList==null and productList.size()==0
what is the difference between productList==null and productList.size()==0  what is the difference between productList==null and productList.size()==0? here productList is of type LIST
What is the difference between the Boolean & operator and the && operator?
What is the difference between the Boolean & operator and the && operator?   Hello, What is the difference between the Boolean & operator and the && operator? thanks
What are difference between Bean Factory and Application Context ?
What are difference between Bean Factory and Application Context ?  Hi, What are difference between Bean Factory and Application Context
Diff between Runnable Interface and Thread class while using threads
Diff between Runnable Interface and Thread class while using threads  Diff between Runnable Interface and Thread class while using threads   Hi Friend, Difference: 1)If you want to extend the Thread class
Diff between Runnable Interface and Thread class while using threads
Diff between Runnable Interface and Thread class while using threads  Diff between Runnable Interface and Thread class while using threads   Hi Friend, Difference: 1)If you want to extend the Thread class
servlets
servlets  what is the duties of response object in servlets
What is the difference between component and tag in JSF?
What is the difference between component and tag in JSF?  Please let me know,becaus i am new to jsf and am confusing
What is difference between Core Java and Advanced Java?
What is difference between Core Java and Advanced Java?  Hi, I want...? What is difference between Core Java and Advanced Java? Thanks   ... topics includeing JSP and Servlets which is necessary to develop web applications

Ads