I am trying to understand the JSP lifecycle and what are the methods we can override in our JSP. But get into some problem.
I usung Java 7 and tomcat 6 version.
i create a simple Page
When I deploy this application the JSP is converted into servlet. below is the servlet.
In this servlet I am getting _jspInit() and _jspDestroy() not the jspInit and jspDestroy Method and getting error when i tried to override :(
Can someone please help me to understand ?
Bear Bibeault wrote:First of all, putting any Java code at all into a JSP is a poor and obsolete practice that has been discredited since 2002. You should not be trying to out Java code into JSPs written since then.
And no, you cannot override internal methods.
Thanks Bear for the response.
I know we should not write the code in the JSP. This is just for understanding. But I read at many places that we can't override _jspService() but we can override jspInt() and jspDestroy(). So is it false ??