• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

what is right sequence here drag and drop qustion

 
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


1 jspInit is called
2 jsp page implementation class is loaded
3 jsp page is complied
4 jspdestroy is called
5 jsp page implementation is instantiate
6 jsp page is translated
7 _jspService is called

----------------------------
 
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Umesh,
The sequence is as follows:
1-Page Translation
2-Page Compilation
3-Class Loading
4-Instantiation
5-JspInit() is called
6-_jspService() is called
7-jsp Destroy() is called.

if you go through the above steps, you'll clearly understand that the jsp page is converted to servlet class.
Before the page is converted to servlet class, it has to be translated to filter out the syntactic errors. all the syntax errors of the jsp page will be caught here.
after successful translation, it is converted to a servlet class. Like any other java files this has to be compiled.
once the class is compiled, it has to be ready for instantiating it. that's why the class needs to be loaded by the container.
after loading the class, an object of this class has to be made ready for servicing and so instantiation of this class follows.
before it services any request, the jsp init() is called to initialise the page with its initialisation parameters if any.
then service() and finally destroy() is called before unloading this class.

i hope you've gone through the basic servlets and jsp's life cycle before coming up to this question.
reply
    Bookmark Topic Watch Topic
  • New Topic