• 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

JSP Life.

 
Ranch Hand
Posts: 295
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is the following steps order is correct, do we have any more steps in the middle.

JSP page is compiled
JSP page is translated
JSP page implementation class is loaded
JSP page implementation class is instantiated
jspInit is called
_jspService is called
jspDestroy is called
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Assuming that by "translation" you mean the step of converting a JSP page into servlet source code, then that needs to happen before the compilation step.
 
Amruth Puppala
Ranch Hand
Posts: 295
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Ulf Dittmer for response.

Originally posted by Ulf Dittmer:
Assuming that by "translation" you mean the step of converting a JSP page into servlet source code, then that needs to happen before the compilation step.




asumption is correct, but without compiling JSP page , will it be translated into Servlet source.?
 
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hope this helps from HFSJ

"The Container takes what you�ve written in your JSP, translates it
into a servlet class source (.java) file, then compiles that into a Java servlet class."

check with Chapter 7.
 
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Chintu,
First JSP page is translated into servlet. During translation phase, the JSP engine reads a JSP page, parses it and validates the syntax of the tags used. For example following directive error will be caught during translation phase only:

After JSP page is translated into a servlet, this servlet is then compiled. In the compilation phase, the java file (that is the file generated in translation phase) is compiled using normal java compiler e.g javac. If you see the following declaration then this declaration will throw error during compilation because it is a valid JSP tag but an invalid java declaration statement.

Hope this will help
 
Amruth Puppala
Ranch Hand
Posts: 295
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks so much Shahnawaz Shakil,

So JSP life would be:
JSP page is translated
JSP page is compiled
JSP page implementation class is loaded
JSP page implementation class is instantiated
jspInit is called
_jspService is called
jspDestroy is called
 
reply
    Bookmark Topic Watch Topic
  • New Topic