• Post Reply Bookmark Topic Watch Topic
  • New Topic

what is right sequence here drag and drop qustion

umesh rawat
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • 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

Abdul Rahman
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Umesh,
The sequence is as follows:
1-Page Translation
2-Page Compilation
3-Class Loading
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.
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!