MY mENU


Wednesday 21 March 2012

Difference between _jspService() and other life cycle methods.


JSP contains three life cycle methods namely jspInit( ), _jspService() and jspDestroy().
- In these, jspInit() and jspDestroy() can be overridden and we cannot override _jspService().
- Web container always generate _jspService() method with JSP content. If we are writing _jspService() method , then generated servlet contains two _jspService() methods which will cause compile time error. To show this difference _jspService() method is prefixed with ‘_’ by the JSP container and the other two methods jspInit() and jspDestroy() has no special prefixes. 

No comments:

Post a Comment