ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
Do you have a collection of Interview Questions and interested to share with us!!
Please send that collection to along with your userid / name. ThanQ
Google
 
Categories  >>  Software  >>  Core Java  >>  Java J2EE  >>  Java Related
 
 


 

 
 Core Java interview questions  Core Java Interview Questions
 Advanced Java interview questions  Advanced Java Interview Questions
 Swing interview questions  Swing Interview Questions
 EJB interview questions  EJB Interview Questions
 Servlets interview questions  Servlets Interview Questions
 Struts interview questions  Struts Interview Questions
 JDBC interview questions  JDBC Interview Questions
 JMS interview questions  JMS Interview Questions
 SunOne interview questions  SunOne Interview Questions
 J2EE interview questions  J2EE Interview Questions
 Weblogic interview questions  Weblogic Interview Questions
 Websphere interview questions  Websphere Interview Questions
 Java Networking interview questions  Java Networking Interview Questions
 Java J2EE AllOther interview questions  Java J2EE AllOther Interview Questions
Question
what is the life cycle of jsp?
 Question Submitted By :: Gopalraop
I also faced this Question!!     Rank Answer Posted By  
 
  Re: what is the life cycle of jsp?
Answer
# 1
It is similar to the lifecycle of a servlet only,
They are:
jsp:init()
jsp:service()
jsp:destroy()
 The init() method initializes the servlet within jsp and 
must be called before the servlet can service any requests. 
In the entire life of a servlet, the init() method is 
called only once. 

After initialization, the servlet can service client-
requests. Each request is serviced in its own separate 
thread. The container calls the service() method of the 
servlet for every request. The service() method determines 
the kind of request being made and dispatches it to an 
appropriate method to handle the request. The developer of 
the servlet must provide an implementation for these 
methods. If a request for a method that is not implemented 
by the servlet is made, the method of the parent class is 
called, typically resulting in an error being returned to 
the requester
. 
Finally, the container calls the destroy() method which 
takes the servlet out of service. The destroy() method like 
init() is called only once in the lifecycle of a Servlet.
 
Is This Answer Correct ?    0 Yes 0 No
Sivasubramanian.k
 

 
 
 
Other Core Java Interview Questions
 
  Question Asked @ Answers
 
How to call a Stored Procedure from JDBC? Satyam2
Explain method overloading and overriding?  5
Difference between Applet & Application?  3
public class Garbage { int a=0; public void add() { int c=10+20; System.out.println(c); System.out.println(a); } public static void main(String args[]) { Garbage obj=new Garbage(); System.gc(); System.out.println("Garbage Collected"); obj.add(); } } Above is a code in java used for garbage collection. object obj has been created for the class Garbage and system.gc method is called. Then using that object add method is called.System.gc method if called the obj should be garbage collected?  6
What is a Java package and how is it used?  1
What is the ResourceBundle? Elementus-Technologies2
how to connect one jsp page to another jsp page???? Symphony2
What are command line arguments?  2
can you program for reverse string? IBM4
what is request processor? Virtusa1
How can be define MARKER interfce in java  1
What is Vector?Can you elaborate how Vector is Thread safe?  3
What are the steps to do connection pooling in weblogic? TCS1
How to deprecate a method? Show it with proper example. Plz give the answer of this.Thanx in advance. mail me: tanzeem.akhtar@gmail.com  1
What is serializable interface? Infosys5
What is compile time polymorphism? Elementus-Technologies5
What are packages and name a few?  2
what is abstract method with example? Virtusa3
What is exception and error? and what is the difference between them?  2
can we have virtual functions in java? Wipro4
 
For more Core Java Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com