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.
Related Tutorials/Questions & Answers:
the servletswhat 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
Difference between JSP and ServletsDifference
between JSP and Servlets
What is the difference
between JSP and
Servlets ?
JSP is used mainly for presentation only. A JSP can only be HttpServlet that means the only supported protocol in JSP is HTTP
Diff between Struts1 and struts 2? - StrutsDiff between Struts1 and struts 2?
What are the difference in
between Struts 1 and Struts 2? Hi Gaurav
There is a big difference... describes some differences
between struts1 and struts2
Feature Struts 1 Struts 2
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 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 difference between TRUNCATE & DELETE What is difference
between TRUNCATE & DELETE
What is difference
between TRUNCATE & DELETE?
Hi,
The DELETE command is used to remove rows from a table. A WHERE clause can be used to only remove some rows
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 difference between the java and javascript?What is difference
between the java and javascript?
What is the difference beteen the java and javascript?
Hello Friend,
Difference:ADS_TO_REPLACE_1
1) Java is a Object Oriented programming language developed
servletsservlets How do you communicate
between the
servlets?
We can communicate
between servlets by using RequestDespatcher interface and servlet chaining
What is the difference between GET and POST method?What is the difference
between GET and POST method? In PHP, both GET... there is a lots of difference
between the both. Can anyone please explain...;difference
between get and post method in PHP
POST method is more secure than GET