Multiple choice technology web technology

jspInit(),jspDestroy and _jspService are lifecycle methods of a JSP . Which of the following is true ?

  1. Only jspInit() can be overridden

  2. Only jspDestroy() can be overridden

  3. Only _jspService() can be overridden()

  4. Both jspInit() and jspDestroy() can be overridden

  5. jspInit(), jspDestroy() and _jspService() can all be overridden

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

JSP lifecycle includes jspInit() for initialization and jspDestroy() for cleanup, both of which can be overridden by developers. The _jspService() method is generated by the container and cannot be overridden - it's where your JSP code ultimately executes.