Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


what is the life cycle of jsp?

Answers were Sorted based on User's Feedback



what is the life cycle of jsp?..

Answer / vijayakumar chinnasamy

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 ?    10 Yes 2 No

what is the life cycle of jsp?..

Answer / sivasubramanian.k

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 ?    7 Yes 1 No

what is the life cycle of jsp?..

Answer / vasanth

Actually the said( jspInit(),_jspService(), jspDestroy())
methods are not JSP life cycle methods, they are convinience
methods. bcz when we run above said methods, internally
servlts life cycle methods also runned., they must take the
support of servlets.

so, init(), service(), destroy() methods are the real life
cycle methods of JSP and jspInit(), _jspService(),
jspDestroy() are the convinience methods.... f

if you want to knw full clarification of above said
scenaria, just the open super class source code that is
available in jasper.jar file..

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More Core Java Interview Questions

Does list allow duplicates in java?

0 Answers  


What are null interfaces in JAVA ? and give me some examples?

5 Answers  


What are desktop procedures?

0 Answers  


How can we make copy of a java object?

0 Answers  


Difference between flush() and commit() in hibernate?

2 Answers   Bally Technologies,


In how many ways we can create threads in java?

0 Answers  


Explain tree set and its features?

0 Answers  


Is there any case when finally will not be executed?

0 Answers  


Hi i am creating desktop application in that i want calling to mobile number. i have java telephone api (JTAPI) but i dont understand how it configure & use plese help me

0 Answers  


What is nextint java?

0 Answers  


whats is the use of final,in which situation final can be used in the application?

2 Answers   DNS,


What is an iterator java?

0 Answers  


Categories