Win a copy of Machine Learning Systems: Designs that scale this week in the Scala forum
or Xamarin in Action: Creating native cross-platform mobile apps in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

JSP Translation Phase  RSS feed

 
Ranch Hand
Posts: 324
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Which of the following things may happen in the translation phase of JSP page?

Select 2 correct options
a Execution of _jspService() method.
b Execution of jspInit() method.
c Creation of the servlet class corresponding to the JSP file.
d Instantiation of the servlet class.
e Loading of the servlet class.

Answer: c, e

But I wonder, does the servlet class be loaded during the 3rd phase: loading servlet class?
So, does the answer be c ONLY? Totaly confused

Please confirm what has happens in the Translation phase AND in which order.


Thanks In Advance

Thanks
 
Ranch Hand
Posts: 1512
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As far as I know, only C is the correct answer. The servlet class is not loaded unless it's specified that the servlet/jsp be loaded on server startup. The "translation Phase" includes the following:

- The JSP page is translated into Java servlet code.
- The servlet code is compiled into a JSP pageimplementation class.
 
Ranch Hand
Posts: 108
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


But I wonder, does the servlet class be loaded during the 3rd phase: loading servlet class?



Servlet class again loaded see page 283 of HFSJ
 
Where all the women are strong, all the men are good looking and all the tiny ads are above average:
Rocket Oven Kickstarter - from the trailboss
https://coderanch.com/t/695773/Rocket-Oven-Kickstarter-trailboss
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!