what is the life cycle of jsp?

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


Please Help Members By Posting Answers For Below Questions

How substring() method of string class create memory leaks?

564


What are the difference between RMI and CORBA?

627


What is ioc concept?

703


Is the session factory thread safe?

697


How can I scroll through list of pages like the search results in google?

579






How many times may an objects finalize() method be invoked by the garbage collector?

686


Define the remote object implementation?

2010


What is re-entrant. Is session beans reentrant. Is entity beans reentrant?

594


whats is mean by tiles in struts

1640


How to implement dphibernate to activate lazy loading in Flex with java ?thanx in advance!

2570


Which textcomponent method is used to set a textcomponent to the read-only state?

643


Difference between hashmap and hashtable?

620


Can constructors be synchronized in java?

631


Is “abc” a primitive value?

627


What is Remote Server?

1696