Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

JSP lifecycle

 
Author
Posts: 399
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi all
Can someone please explain JSP Lifecycle(interview question)...??
tia
MB
 
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Typical life cycle for a JSP page:
A JSP before it is accessed for the first time exists as a .jsp file.
On the first request, it is translated to a .java file which is then compiled to a .class file for the servlet container to use.
From this point on, it enters the life cycle of a servlet
Hope this helps
V
 
Malhar Barai
Author
Posts: 399
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thnx vicky
but when and how are the jspInit, jspService methods called and in what order.
tia
MB
 
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by Malhar Barai:
thnx vicky
but when and how are the jspInit, jspService methods called and in what order.
tia
MB


look at the Sun website...
JspPage
 
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think the fairest thing to say on the issue of java vs php is that you may well like php for smaller sites. Short and seet work whose requirements won't really get that much more complicated down the line.
However, if you want a robust and extensible model, JSP is the best their is, not least of all because java is one of the easiest OO languages to learn (and having learned Java you essentially know C# as well!) and there is the whole power of the whole java arsenal behing you.
Peronally, if somethings worth doing and its important - do it in java.
Either way, good luck!
Simon
 
Malhar Barai
Author
Posts: 399
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by Ron Perich:

look at the Sun website...
JspPage


hi Ron
This only links me to the APIs, I want to know the complete lifcycle in the sense that wat is called first :
1. jspInit()
2. _jspService()...and so on...as I am not clear on wat method is called i.e is it _jspInit() or jspInit()...
tia
MB
 
Whoever got anywhere by being normal? Just ask this exceptional tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic