File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JSP and the fly likes Sequence of Page loading Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "Sequence of Page loading" Watch "Sequence of Page loading" New topic

Sequence of Page loading

amit sanghai
Ranch Hand

Joined: Dec 05, 2000
Posts: 231
What are the sequences in which the JSP page is loaded? i.e. init(),load(),compilation, destroy?
Jason Brawner
Ranch Hand

Joined: Dec 19, 2001
Posts: 66
The JSP lifecycle goes something like this...
1. Translated - to a servlet
2. Compiled - servlet is compiled
3. Loaded - loaded by a class loader
4. Instantiated - instance is created
5. Initialized - init() method invoked
6. Each user request is sent through the jspService() method
7. destroy() is called before being taken out of service.
Hope this helps,

Jason E. Brawner<br />Sun Certified Java Programmer<br />Sun Certified Web Component Developer
I agree. Here's the link:
subject: Sequence of Page loading
It's not a secret anymore!