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                      
tip   To Refer this Site to Your Friends   Click Here
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 ?    1 Yes 0 No
Sivasubramanian.k
 
  Re: what is the life cycle of jsp?
Answer
# 2
jsp life cycle:
===============
1.Page translation - automatically translate the .jsp file 
in .java(servlet)file
2.Compilation   - automatically compile the .java(servlet) 
file and create .class file .
3.Loading - load the compiled servlet into container.
4.Create instance - create instance for loaded servlet 
(.java)
5.call jspInit method. (call only one time)
6.call _jspService method
7.call jspDestroy method.(call only one time)
 
Is This Answer Correct ?    3 Yes 0 No
Vijayakumar Chinnasamy
 
 
 

 
 
 
Other Core Java Interview Questions
 
  Question Asked @ Answers
 
different types of threads? TCS7
what is difference between colection and collections? Tech-Mahindra8
What is Generic in java? Where can we write Generic ( class or method or objects or etc...)? with simple example? Thanks, Bose. Infosys1
Accenture NJ mostly ask question on Collection like 1)How to sort Objcts and how treeset sort them 2)Explain mechanism of Hashcode finding in Java 3)Name some of the Sorted collection. Accenture2
what is polymorphism?  2
Is Java is 100% pure OOPS? Explain?  15
question on Thread synchronization Huawei1
What is a method ?  4
What are the latest versions in JAVA related areas? Netcraft2
What is the life cycle of Thread ? HCL7
What is compile time polymorphism? Elementus-Technologies6
Which java.util classes and interfaces support event handling?  2
A class can be a subclass of itself? Genesis2
what is difference between Action messages and Action errors? TCS1
primitive data types in Java ?  3
What are null interfaces? Give some examples?  2
Hi Friends, can u give code to convert ArrayList to HashMap and HashMap to ArrayList.  1
what do you meant by Runtime Polymorphism? Persistent10
Explain Connection Pooling?  3
How many bits are used to represent unicodde,ASCII,UTF-16 and UTF-8 characters?  2
 
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