Perhaps it just builds on some of the basic functionality tied into the init() service() destroy() lifecycle methods built into the servlet interface. Servlet also provides the getServletConfig() which can be used in cases where you want to access init-param from the web.xml file inside the jsp. JspPage adds the jspInit() and the jspDestroy() methods which are invoked by the container for the lifecycle methods instead of the servlet init() and destroy() but my guess is that it still uses some of the "behind the scenes" functionality used by the original methods. Just A Thought...
Joined: Feb 25, 2002
There is no implementation happening behind the scene. Servlet, JspPage and HttpJspPage are all interfaces. May be, JspPage was not a Servlet during the initial release and then got retrofitted as a Servlet. This is my best guess.
Originally posted by Sai Prasad: Can you help me understand why javax.servlet.jsp.HttpJspPage interface extends both javax.servlet.Servlet and javax.servlet.jsp.JspPage interfaces? If you notice, JspPage also extends the Servlet interface. Thanks.