In HFS page no. 344:It says that the jspInit() is called from the servlet's init() by the Container.But how will the container come to know that there is a jsp available so call its jspInit().
Because if there is no jsp available then the container just calls the servlet's init() passing servletconfig and servletcontext args.
When you create a JSP, your JSP is translated into a servlet which extends a base class which in-turn implement the HttpJspPage interface. The container calls the init method of the base class which calls the jspInit method. In tomcat, all JSPs extends from org.apache.jasper.runtime.HttpJspBase class. The init method of HttpJspBase class calls the jspInit method...
If I am not wrong then the HttpJspBase class is implemented by the Vendor specific(Tomcat)---right?
So Tomcat's adds a line jspInit() inside the init() of HttpJspBase class.
Then why the book writes ServletConfig sConfig = getServletConfig();page:344
when the init() in HttpJspBase can call the jspInit() by passing the config parameter.