• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Sequence of Elements in the JSP Life Cycle

 
JiaPei Jen
Ranch Hand
Posts: 1309
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How do I place several elements such as
Create Instance
Page translation
JSP compilation
Load class

in the JSP life cycle

Call jspInit
Call _jspService
Call jspDestroy
?
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13074
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your code never calls jspInit and jspDestroy - these methods are called by the servlet container only once, when the servlet is created and when it is destroyed.
The servlet container will call _jspService for every request.
SO:
Page Translation -> JSP compilation -> Load class -> Create Instance -> jspInit called
(any number of _jspService calls)
-> jspDestroy (at the container's discretion)
Bill
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic