Multiple choice technology web technology

Following methods can be overridden in the JSP page.

  1. _jspService()

  2. jspInit()

  3. jspDestroy()

  4. getParameter()

Reveal answer Fill a bubble to check yourself
B,C Correct answer
Explanation

In JSP, only jspInit() and jspDestroy() can be overridden by developers. The _jspService() method is generated by the container and cannot be overridden (it's marked final in the generated servlet). getParameter() is a method of ServletRequest interface, not a JSP lifecycle method.

AI explanation

In a JSP page, the container generates the _jspService() method automatically from your JSP content — you cannot override it (attempting to declare it yourself causes a translation error). However, JSP pages implementing the Servlet/JspPage lifecycle can override jspInit() and jspDestroy(), which are called when the generated servlet is initialized and destroyed, just like a regular servlet's init()/destroy(). getParameter() is not a lifecycle method to override at all — it's a method you call on the request object to read request parameters.