Win a copy of The Business Blockchain this week in the Cloud forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JSP Translation Phase

 
Poonam Agarwal
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
 
Bosun Bello
Ranch Hand
Posts: 1511
  • 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.
 
ankit kumar
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic