_jspService(HttpServletRequest, HttpServletResponse) is mandatorily inserted into the servlet resulting from the JSP But the jspInit() and jspDestroy( ) are optionally inserted depending on whether or not they are defined in the JSP. (this is said in whizlabs)
Is this statement true ?
If yes, i.e. if we dont override them in our JSP, who defines these methods ( JspPage is a interface, and HttpJspPage too is a interface, so who defines these methods )
If No,again, who provides there imlementation ? is it the container that provides it by saying this -
i mean the org.apache,jasper.runtime.HttJspPage provides the implementaion of jspInit( ) jspDestroy( ) and _jspService( ) of the JspPage and HttpJsp interfaces, but then the class says '....org.apache,jasper.runtime.JspSourceDependent' instead of saying '....org.apache,jasper.runtime.HttpJspInterface' !
Any help in this direction will help Thanks in advance !
SCJP 1.4 - 95% [ My Story ] - SCWCD 1.4 - 91% [ My Story ] Performance is a compulsion, not a option, if my existence is to be justified.
As far as Im aware of, when a Jsp page is turn into the so called page implementation class, this generated class got to be implementing the interface javax.servlet.jsp.HttpJspPage (which is extended from JspPage).
JspPage interface defines the method jspInit and jspDestroy, while HttpJspPage define one additional method _jspService.
Web container such as Tomcat, WAS or etc, usually provides a base page class that all Jsp page implementation class will be extended from, for various reasons such as optimization and extra container services.
If you provides your own jspInit or jspDestroy in your jsp page, this means that you are overriding the implementation of the base class, which I think it's not a so good idea. Well, it's still container specific.
Hope this help. Cheers
SCJP, SCWCD, SCJWS, IBM 700,IBM 701, IBM 704, IBM 705, CA Clarity Technical<br /> <br /><a href="http://eddyleesinti.blogspot.com" target="_blank" rel="nofollow">http://eddyleesinti.blogspot.com</a>