What are the life-cycle methods of JSP?

By: Karthik Printer Friendly Format    

Answer: Life-cycle methods of the JSP are:
a) jspInit(): The container calls the jspInit() to initialize the servlet instance. It is called before any other method, and is called only once for a servlet instance.
b)_jspService(): The container calls the _jspservice() for each request and it passes the request and the response objects. _jspService() method cann't be overridden. 
c) jspDestroy(): The container calls this when its instance is about to destroyed.
The jspInit() and jspDestroy() methods can be overridden within a JSP page.



Most Viewed Articles (in Interview )

What types of comments are available in the JSP?

Interview Question: Is Decorator an EJB design pattern?

Question: What is a Hidden Comment in JSP?

What is Deployment Descriptor?

What are all the different scope values for the tag?

Interview Question: How is the MVC design pattern used in Struts framework?

Interview Question: What is Struts Validator Framework?

Interview Question: Does Struts include its own unit tests?

Interview Question: Where can I get help with Struts?

Interview Question: If the framework doesn't do what I want, can I request that a feature be added?

Interview Question: What about JSTL and JavaServer Faces ?

Interview Question: What is EJB client JAR file?

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

Interview Question: What is abstract schema?

Interview Question: What is the difference between JavaBean and EJB?

Latest Articles (in Interview)

Comment on this tutorial