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

 
 


Nagendran
what is diff between generic servlets and httpservlets
1 Answer(s)      a year ago
Posted in : Servlet Interview Questions

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.









Related Pages:
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
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
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
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
servlets
servlets   Hi what is pre initialized servlets, how can we achives?   When servlet container is loaded, all the servlets defined...; in between the <servlet></servlet> tag
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
servlets
what are the different ways we can maintain state between request  what are the different ways we can maintain state between request   Different ways of maintaining state?s between stateless requests: 1)URL rewriting
diff between spring and struts in java
diff between spring and struts in java  diff between spring and struts in java
servlets
what is the difference between getsession true and getsession fales servlets  what is the difference between getsession true and getsession fales   The getSession(true) will check whether a session already exists
servlets
what is the difference between dopost and doget methods  what is the difference between dopost and doget methods   doGet is used when there is are requirement of sending data appended to a query string in the URL
jsp and servlets
jsp and servlets  what is difference between jsp and servlet?? what should a person use to develop website ??   JSP is used for view in MVC.... Developing a website is generic question you may have to find out the usage
diff bw sructs,hipernet,spring - Framework
diff bw sructs,hipernet,spring  what is the difference between structs,hipernet,spring which applications suitabe for structs,hipernet,spring  Hi friend, http://www.roseindia.net/spring/ http://www.roseindia.net
Generic Types with Dynamic Decorators - Java Tutorials
subscribed from 55 countries Proxy vs. Decorator What is the difference between...Generic Types with Dynamic Decorators 2001-10-24 The Java Specialists' Newsletter [Issue 034] - Generic Types with Dynamic Decorators Author: Dr. Heinz
servlets
servlets  what is the duties of response object in servlets
servlets
servlets  How do you communicate between the servlets?   We can communicate between servlets by using RequestDespatcher interface and servlet chaining
servlets
what are advantages of servlets  what are advantages of servlets   Please visit the following link: Advantages Of Servlets
servlets
what is the architecture of a servlets package  what is the architecture of a servlets package   The javax.servlet package provides interfaces and classes for writing servlets. The Servlet Interface The central
servlets
which are the differ ways you can communicat between servlets  which are the differ ways you can communicat between servlets   Different ways of communicating between servlets:- 1)Using RequestDispatcher object. 2
servlets
servlets  why we require wrappers in servlets? what are its uses? Please explain   These wrappers classes help you to modify request...://www.roseindia.net/servlets/response-filte.shtml
servlets
servlets why do we need web-inf directory in web application  why do we need web-inf directory in web application? means what's the benefits of doing so
Sessions in servlets
Sessions in servlets  What is the use of sessions in servlets?   The servlet HttpSession interface is used to simulate the concept... with no necessary connection between one request and the next
servlets
what are sessions in servlets  what are sessions in servlets   A Session refers to all the request that a single client makes to a server...: http://roseindia.net/jsp/jspsession/ http://www.roseindia.net/servlets
servlets
what are cookies in servlets  what are cookies   Cookies... regarding the user usage and habits. Servlets sends cookies to the browser client...://www.roseindia.net/jsp/jspcookies.shtml http://www.roseindia.net/servlets/use
servlets
what are filters in java servlets  what are filters in java   Filters are powerful tools in servlet environment. Filters add certain functionality to the servlets apart from processing request and response paradigm
Diff b/w servlet n jsp - Java Interview Questions
Diff b/w servlet n jsp  hii i want to know the difference between... with the html. Servlets are compiled pure Java class files (not mixed with HTML...://www.roseindia.net/servlets/ Thanks
servlets
servlets  what are different authentication options available in servlets   There are four ways of authentication:- HTTP basic authentication HTTP digest authentication HTTPS client authentication Form-based
Servlets
Servlets  What is the filter code to authenticate the user
servlets
what are the two important api in for servlet  what are the two important api in for servlet   Two important packages are required to build servlet "javax.servlet" and javax.servlet.http
servlets
why is http protocol called as a stateless protocol  why is http protocol called as a stateless protocol   A protocol is stateless if it can remember difference between one client request and the other. HTTP
servlets
servlets  q)What will happen if you donā??t write the implementation in service () of our Servlet? Which method () it will call? q2)How many times init() execute and what happen if browser is close and server shutdown ? JSP
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
what is functionality of requestdispatcher object servlets  what is functionality of requestdispatcher object   The RequestDispatcher allows the dynamic inclusion of web components either by including in the current
servlets
what is url rewriting  what is url rewriting   It is used to maintain the session. Whenever the browser sends a request then it is always interpreted as a new request because http protocol is a stateless protocol
servlets
servlets  what is ResultSet?   ResultSet is a java object that is used for database connectivity to hold the data returned by a select query. When we run a select query it returns us the data in a table format with each
the servlets
what is the use of servlet context  what is the use of servlet context   ServletContext is a interface which helps us to communicate with the servlet container. There is only one ServletContext for the entire web
servlets
servlets  Even though HttpServlet doesn't contain any abstract method why it is declared as abstract class? what benifits we can get by declaring like this?(i.e, with out containing the abstract methods, declaring a class
SERVLETS
SERVLETS  I follow the same procedure what you send by the links.but i got the same errors coding is: import java.io.*; import java.sql.*; import javax.servlet.*; import javax.servlet.http.*; public class
what is the difference between jdk 1.4 and 1.5 and 1.6
what is the difference between jdk 1.4 and 1.5 and 1.6  what is the difference between jdk 1.4 and 1.5 and 1.6   Java 1.4 Features...: automatic conversions between primitive types (such as int) and primitive wrapper
Java-Generic Interface
Java-Generic Interface  Hi Friends, The current connector for accepting request to our existing system is written in C language,we had build a ".so...). Could some one guide me what are the possible way I can go about it,How can I
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
servlets - Java Beginners
servlets   I am doing small project in java on servlets. I want to generate reports on webpage ,how is it possible and what is the difference between dynamic pages & reports ? tell me very urgent pls,pls
Servlets - Java Interview Questions
Servlets  What is the difference between servlet context and servlet... and are available to all the servlets within that application. It represents your web... are specified for a particular servlet and are unknown to other servlets
Generic toString - Java Tutorials
Generic toString 2003-10-08 The Java Specialists' Newsletter [Issue 079] - Generic toString() Author: Dr. Heinz M. Kabutz If you are reading.... Generic toString() I would like to thank Ravi Nukala for the idea
servlets - Servlet Interview Questions
is,what is the difference between servletcex and servletconfig(full flezed... servlet and are unknown to other servlets. The ServletContext parameters... and are available to all the servlets within that application ServletContext
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 PHP4 and PHP5?
What is the difference between PHP4 and PHP5?  What is the difference between PHP4 and PHP5

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.