Can we override jspInit()

Showing Answers 1 - 1 of 1 Answers

sekhar_ch1

  • Mar 1st, 2006
 

Sure we can override jspinit() and jspdestroy().But we can not override _jspService().Since what ever we wrote code in the JSP will be placed in _jspService() of generated servlet class(from JSP) .means _jspService() is already imlimented by us.So if we attempted to override _jspService() it will give a compilation error regarding the method _jspService() is already defined.

         But in case of jspinit() and jspdestroy() the methods are not  implemented by us in the generated servlet.so if we override these methods these methods will be included in the generated servlet.so there is no problem. 

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions