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

What is the purpose of the notify() method?

602


which book is better for jdbc ,servlets and jsp

1650


Describe responsibilities of Activator?

1679


How can I avoid validating a form before data is entered?

556


what are getters and setters in Java with examples?

1288






Explain the difference between object state and behavior?

570


What’s jboss jbpm?

587


Can I map more than one table in a cmp?

596


To identify IDL language what mapping mechanism is used?

3419


What is ripple effect?

637


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

638


Can I import same package/class twice? Will the jvm load the package twice at runtime?

649


Can I run seam with jdk 1.4 and earlier?

561


For which statements does it make sense to use a label?

593


we use MainFrame and using os390 for operating system with DB2 data base in IRAN and interest programing with java and use webspere for world wide,please help me where i should start?

1930