Multiple choice technology architecture

What are the life-cycle methods of JSP?

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

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

  3. doPost()

  4. none of the above

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

JSP pages are translated into servlets with specific lifecycle methods. jspInit() is called once when the JSP is initialized, _jspService() handles each request (equivalent to service()), and jspDestroy() is called before removal. The servlet methods init(), service(), destroy() are the underlying servlet equivalents, not the JSP-specific names.