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



Home Answers Viewqa Servlet-Interview-Questions Related to GenericServlet and HttpServlet
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


Ravi Kumar Mahato
Related to GenericServlet and HttpServlet
1 Answer(s)      3 years and 5 months ago
Posted in : Servlet Interview Questions


Que: Http Servlet extends Generic Servlet then Why both GenericServlet and HttpServlet implements Serializable interface ?


Advertisement
View Answers

April 12, 2011 at 2:52 PM


GenericServlet and HttpServlet implement the Serializable interface so that servlet engines can "hybernate" the servlet state when the servlet is not in use and reinstance it when needed or to duplicate servlet instances for better load balancing. I don't know if or how current servlet engines do this, and it could have serious implications, like breaking references to objects gotten in the init() method without the programmer knowing it. Programmers should be aware of this pitfall and implement servlets which are stateless as possible, delegating data store to Session objects or to the ServletContext. In general stateless servlets are better because they scale much better and are cleaner code.



Related Tutorials/Questions & Answers:
Related to GenericServlet and HttpServlet
Related to GenericServlet and HttpServlet  Que: Http Servlet extends Generic Servlet then Why both GenericServlet and HttpServlet implements Serializable interface ?   GenericServlet and HttpServlet implement
Difference between GenericServlet and HttpServlet
and HttpServlet. GenericServlet is an abstract class that extends java.lang.Object while HttpServlet is an abstract class that extends GenericServlet... does not have doGet() and doPost() methods. GenericServlet requires HttpServlet
Advertisements
GenericServlet
GenericServlet  What is the GenericServlet class?   GenericServlet makes writing servlets easier. To write a generic servlet, all you need to do is to override the abstract service method
Java httpservlet
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
HttpServlet protocols
HttpServlet protocols   What are the type of protocols supported by HttpServlet?   It extends the GenericServlet base class and provides an framework for handling the HTTP protocol. So, HttpServlet only supports HTTP
Session with GenericServlet
Session with GenericServlet  Can I create a session with GenericServlet?   There are no protocol-specific features in GenericServlet, which is an implementation of the basic, general purpose Servlet interface. Servlet
Methods of HttpServlet
Methods of HttpServlet  What are methods of HttpServlet
HttpServlet is declared abstract
HttpServlet is declared abstract  Explain why HttpServlet is declared abstract
HttpServlet reading XML from HttpRequest - XML
HttpServlet reading XML from HttpRequest   Hi , My requirement is 1.Input to the HttpServlet will be the XML sent by upstream as HttpRequest.... HttpServlet should only read the XML from HttpRequest and put it to a string. Can any
StringBuffer related.
StringBuffer related.  how to make StringBuffer as immutable
related to database
related to database  how to override existing values in table? when user enters his updated data through query
Related to Histogram
Related to Histogram  hi this is srinivasrao. In my project i have to display using chart for that i want to use histogram. k chart displayed but the values given by me is not related display chart so please give the code if u
related to java
related to java  what is mean of }); in java.i know that } is used to close a block of statement,) is used to close a statement and ";"is used after close a statement but i can not usderstood the use of }); together in a java
Related to XML
Related to XML  I have made a web application which send the SMS, i have provided the url in which i have to save the msg and the number's(to whom the message to be send).After fetching the message and numbers i was keeping
Related to XML
Related to XML  I have made a web application which send the SMS, i have provided the url in which i have to save the msg and the number's(to whom the message to be send).After fetching the message and numbers i was keeping
Related to Project
Related to Project  how speech to text project can be make in java? Please tell me the coding part therapeutically i know i have to use java speech api which offer two technology 1. speech recognization 2. speech syenthesis
Dumps related to weblogic certification
Dumps related to weblogic certification   I want to perform the weblogic certification exam code 1z0-110. Can anybody please provide me the dumps related to 1z0-110 Thanks in advance
question related to overloading
question related to overloading  what is difference between function overloading & method overloading
question related to overloading
question related to overloading  what is difference between function overloading & method overloading
Java and jvm related question
Java and jvm related question  What is difference between java data types and jvm data types
Java Related Question
Java Related Question  hi, Why java doesn't has primitive type as an object,whats an eligibility to have a primitive type as an object by the languages
liferay related query
liferay related query  can you suggest me how to get all the session ids of different users logged in to liferay
Server Related exception
Server Related exception  How will write code to handle serverside exceptions in our projects.Earlier we dont know which exception the code will throw
Question related to Hibernate
Question related to Hibernate  Why do we use Set in child class in 1:many hibernate ,why can't we use Directly HashSet
database related query
database related query  i have created database in phpmyadmin of wampserver ! but i can't see it in mysql command line ! Can anybody please help me
iphone property list related
iphone property list related  question related to iphone application...... how to retrieve data from plist and again check the condition if data is found in plist then go to next view and print those value in table
string related question
string related question  *q.1>how i dispaly the reference of string variableS ? eg:-String s1="my name"; Sring s2="your name"; here what is address of variable s1 and s2
JDBC related query
JDBC related query  How to merge two resultset of two different queries, wherein both the resultset(after query execution)gives an integer value as its column
problem related to onSubmit() method
problem related to onSubmit() method  Hello, I am developing application.when i submit form at that time formBacking() method is call...Instead of that onSubmit() should have to call .... please help me
project related question
project related question  1- how to insert a date through hibernate 2- how to insert exact time ,date separetly in the data base for current time date
Struts related Question
Struts related Question  Hi All, I have a one question on validation framework for client side validation please help me on that. suppose i don't want to put required=true in our JSP then what will happen. what error will come
Advertisements
 

 

 

DMCA.com