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



Home Answers Viewqa Servlet-Interview-Questions what is diff between generic servlets and httpservlets
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


Nagendran
what is diff between generic servlets and httpservlets
1 Answer(s)      2 years and 6 months ago
Posted in : Servlet Interview Questions


what is diff between generic servlets and httpservlets


Advertisement
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.



Related Tutorials/Questions & Answers:
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
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
Advertisements
diff between encapsulation and abstraction code
diff between encapsulation and abstraction code  diff between encapsulation and abstraction code
diff between spring and struts in java
diff between spring and struts in java  diff between spring and struts in java
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
Diff between Struts1 and struts 2? - Struts
Diff 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
Difference between JSP and Servlets
Difference 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 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
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 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 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 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 $message and $$message?
What is the difference between $message and $$message?  What is the difference between $message and $$message
What is difference between a PROCEDURE & FUNCTION ?
What is difference between a PROCEDURE & FUNCTION ?  What is difference between a PROCEDURE & FUNCTION
What is the difference between PHP4 and PHP5?
What is the difference between PHP4 and PHP5?  What is the difference between PHP4 and PHP5
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
diff betn show n visible
diff betn show n visible  what is difference between show() & visible method in java
Diff b\w C++ & Java
Diff b\w C++ & Java  What is the difference between C++ & Java
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, Read Here Thanks
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
diff b/w applet and servlet
diff b/w applet and servlet  what is the difference between applet and servlet?   Difference between servlet and applet: 1)An applet... over the browser whearas servlets run over the server. 3)Servlet doesn't have
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 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: 1) Java is a Object Oriented programming language developed by Sun Microsystems
What is the difference between IN and BETWEEN, that are used inside a WHERE clause?
What is the difference between IN and BETWEEN, that are used inside a WHERE clause?  What is the difference between IN and BETWEEN, that are used inside a WHERE clause?   Hi, The BETWEEN clause is used to fetch a range
Advertisements
 

 

 

DMCA.com