• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Compiling jsp to servlet-Concept

 
James Winfrey
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Rancheers

I have a few doubts in the jsp compiling to servlet process.

when is the jsp translated into java servlet source code?
when is the java servlet source code compiled to java class?
when is the servlet first loaded, instantiated,initialized?

Thanks
James
 
Frits Walraven
Creator of Enthuware JWS+ V6
Saloon Keeper
Pie
Posts: 2401
92
Android Chrome Eclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi James,

According to the JSP specifications: JSP.1.1.4

A JSP container manages two phases of a JSP page s lifecycle. In the translation
phase, the container validates the syntactic correctness of the JSP pages and tag
files and determines a JSP page implementation class that corresponds to the JSP
page. In the execution phase the container manages one or more instances of this
class in response to requests and other events.

and furthermore about the translation phase:

The translation of a JSP source page into its implementation class can occur at
any time between initial deployment of the JSP page into the JSP container and
the receipt and processing of a client request for the target JSP page.

When you define a JSP page in a servlet element with a load-on-startup element, it will be instantiated at the start of the application, otherwise the container decides

Does this answer your questions?
Regards,
Frits
 
James Winfrey
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks a lot Frits.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic