Answer Posted / malligontla
THe generated servlet class for a JSP page implements the
HttpJspPage interface of the javax.servlet.jsp package.
HttpJspPage interface extends the JspPage interface which
inturn extends the Servlet interface of the javax.servlet
package. the generated servlet class thus implements all the
methods of the these three interfaces. The JspPage interface
declares only two mehtods - jspInit() and jspDestroy() that
must be implemented by all JSP pages regardless of the
client-server protocol. However the JSP specification has
provided the HttpJspPage interfaec specifically for the JSp
pages serving HTTP requests. This interface declares one
method _jspService().
The jspInit()- The container calls the jspInit() to
initialize te servlet instance.It is called before any other
method, and is called only once for a servlet instance.
The _jspservice()- The container calls the _jspservice() for
each request, passing it the request and the response objects.
The jspDestroy()- The container calls this when it decides
take the instance out of service. It is the last method
called n the servlet instance.
| Is This Answer Correct ? | 10 Yes | 1 No |
Post New Answer View All Answers
What are the design considerations while making a choice between using interface and abstract class?
How are commas used in the intialization and iteration parts of a for statement?
Explain RMI Architecture?
What value does read() return when it has reached the end of a file?
How would you detect a keypress in a jcombobox?
How to pass parameters in RMI?
What is table mutation and how do you avoid it?
Why use POJO when I can use hashmap
How is a java object message delivered to a non-java client?
What is the purpose of the notify() method?
AS a developer will u create a data source in connection pool? If so how will u do that, how to access the object from connection pool using IRAD tool?
How can I avoid validating a form before data is entered?
What happens when a thread cannot acquire a lock on an object?
What is the difference between the session.update() method and the session.lock() method?
How can I scroll through list of pages like the search results in google?