This interface defines only one method :
1. jspService( )
Syntax:
public abstract void _jspService(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException,java.io.IOException |
1. This method will be executed for each client request.
2. Web container always calls service () method available in HttpJspBase class which intern calls _jspService() .
3. We can’t override service () method in our jsp, because it is declared as final in HtpJspBase class.
4. Web container will always generate _jspService() in the generated servlet at the time of translation page.
5. If we are placing _jspService() method explicitly in jsp then generated servlet class contains two _jspService() methods which causes compile time error and a java class never allow to contain more than one method an same signature. Hence we can’t over ride _ JspService() method explicitly in the jsp.
Note:The following three methods are considered as life cycle methods of the jsp.
1. jspInit()
2. jspDestroy()
3. _jspService()
No comments:
Post a Comment