What are the life-cycle methods of JSP?

By: Karthik Emailed: 1768 times Printed: 2515 times    

Latest comments
By: rohit kumar - how this program is work
By: Kirti - Hi..thx for the hadoop in
By: Spijker - I have altered the code a
By: ali mohammed - why we use the java in ne
By: ali mohammed - why we use the java in ne
By: mizhelle - when I exported the data
By: raul - no output as well, i'm ge
By: Rajesh - thanx very much...
By: Suindu De - Suppose we are executing

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.

Interview Home | All Interview Tutorials | Latest Interview Tutorials

Sponsored Links

If this tutorial doesn't answer your question, or you have a specific question, just ask an expert here. Post your question to get a direct answer.



Bookmark and Share

Comments(0)


Be the first one to add a comment

Your name (required):


Your email(required, will not be shown to the public):


Your sites URL (optional):


Your comments:



More Tutorials by Karthik
What is the difference between interface and abstract class?
What are the life-cycle methods of JSP?
What is JSP Scriptlet?
What is JSP declaration?
What types of comments are available in the JSP?
What is expression in JSP?
What is JSP Output Comments?
What are all the different scope values for the tag?
What are implicit Objects available to the JSP Page?
What is the difference between jsp:forward and response.sendRedirect(url),?.
What is the difference between jsp:include page and @ include file?
What do you understand by JSP Actions?
What are Access Specifiers available in Java?
Explain the different forms of Polymorphism.
Explain the Polymorphism principle.

More Tutorials in Interview
What is J2EE?
What do you understand by a J2EE module?
Tell me something about J2EE component?
What are the contents of web module?
Differentiate between .ear, .jar and .war files.
What is the difference between Session Bean and Entity Bean?
Why J2EE is suitable for the development distributed multi-tiered enterprise applications?
What do you understand by a container?
What are the services provided by a container?
What are types of J2EE clients?
What is Deployment Descriptor?
What do you understand by JTA and JTS?
What is JAXP?
What is J2EE Connector architecture?
What is difference between Java Bean and Enterprise Java Bean?

More Latest News
Most Viewed Articles (in Interview )
Interview Question: What is Action Class?
Interview Question: Is Decorator an EJB design pattern?
Question: What is an Expression tag in JSP?
What do you understand by a J2EE module?
What is the difference between Session Bean and Entity Bean?
What do you understand by JTA and JTS?
Explain the different forms of Polymorphism.
Interview Question: How is the MVC design pattern used in Struts framework?
Interview Question: Why it is called Struts?
Interview Question: What about JSTL and JavaServer Faces ?
Interview Question: What is EJB client JAR file?
Interview Question: What is the difference between sessioncontext and entitycontext?
Interview Question: What are the call back methods in Entity bean?
Interview Question: What is Message Driven Bean?
Question: What is a Hidden Comment in JSP?
Most Emailed Articles (in Interview)
Interview Question: Who makes the Struts?
Interview Question: Where can I get a copy of Struts?
Interview Question: Is Decorator an EJB design pattern?
Interview Question: What is deployment descriptor?
Question: What is an Expression tag in JSP?
Question: What is a Hidden Comment in JSP?
What are types of J2EE clients?
What is J2EE Connector architecture?
Name the containers which uses Border Layout as their default layout?
Is Iterator a Class or Interface? What is its use?
Explain the Encapsulation principle.
Explain the Polymorphism principle.
Interview Question: What is Struts?
Interview Question: How is the MVC design pattern used in Struts framework?
Interview Question: Why it is called Struts?