Multiple choice technology web technology

Which of the following are true statements about the JavaServer Page life cycle? (Choose two.)

  1. The _jspService() method is called from the generated servlet's service() method.

  2. jspInit() is only ever called on the first request to a JSP instance.

  3. jspDestroy() is only ever called on the last request to a JSP instance.

  4. All servlet methods are accessible from the jspInit() method.

  5. You cannot override or provide a no-parameter init() method in a JSP page.

Reveal answer Fill a bubble to check yourself
A,D Correct answer
Explanation

Option A is correct: the generated servlet's service() method calls _jspService(). Option D is correct: jspInit() runs in the servlet context, so all servlet methods (including getServletConfig(), getServletContext(), etc.) are accessible. Options B and C are wrong: jspInit() is called once per instance (not once per request), and jspDestroy() is called when the instance is destroyed, not on the last request. Option E is wrong: you CAN override init() via jspInit().