Multiple choice technology

What are the life-cycle methods of JSP?

  1. jspInit(), _jspService() & jspDestroy()

  2. init(), service(), destroy()

  3. both 1&2

  4. none

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

JSP pages are translated into Servlets, and the lifecycle methods reflect this. jspInit() is called once when the JSP is first loaded (like init()). _jspService() handles each request (like service()). jspDestroy() is called when the JSP is unloaded (like destroy()). Options in B are Servlet lifecycle methods, not JSP-specific.