Here is a exam watch from david bridge water book and i am unable to understand what it means, please help
If you want to harness jspInit() and jspDestroy() for your own setup and tear-down processes,
you can—by overriding either or both in a JSP declaration, which we explore a little later in this chapter. What if you
decided to override the servlet equivalents, init(ServletConfig config) and destroy()? Well, the JSP spec says
you can’t and mustn’t do this. Most JSP container providers prevent this happening by making all Servlet interface methods
fi nal in the base JSP servlet that they provide—your generated JSP servlet that inherits from this can’t possibly override
them. And while on the subject of overriding, you can’t override _jspService() either. This method represents your page source
in Java code form—it’s up to the clever container’s page generators to worry about the implementation and generation of this
method for each individual JSP. It makes no sense for you to override it within the JSP page itself.
It just tells you that (if you really want to) you can override the jspInit() and jspDestroy() methods but you can't override the Servlets equivalents (although a JSP is a Servlet). Furthermore remember that your JSP is generated into a Servlet, and this is what the API tells you:
The _jspService()method corresponds to the body of the JSP page. This method is defined automatically by the JSP container and should never be defined by the JSP page author.
All of the world's problems can be solved in a garden - Geoff Lawton. Tiny ad:
RavenDB is an Open Source NoSQL Database that’s fully transactional (ACID) across your database