Describe the life cycle methods of a jsp? , JAVA Programming

Assignment Help:

 

1. Pre-translated: Before the JSP file has been compiled and translated into the Servlet.

2. Translated: The JSP file has been compiled and translated as a Servlet.

3. Initialized: Prior to handling the requests in the service function the container calls the jspInit() to initialize the Servlet. Invoked only once per Servlet instance.

4. Servicing: Services the client requests. Container invokes the _jspService()  function for each request.

5. Out of service: The Servlet resource is out of service. The container invokes the jspDestroy() function.

Could you have your JSP-generated servlet subclass your own servlet instead of the default HttpServlet?

Your JSP started servlet may extend your own servlet with the directive:

<%@ page extends="com.CRMServlet"%>

But, you have to be very careful when having your JSP pages added your own servlet class.  By doing so you can lose any advanced optimization that can be given by your JSP engine.  If you do have a compelling problem to do so then your own superclass servlet has to fill the aspect with the JSP engine by:

1.  Providing the HttpJspPage interface for JspPage interface or HTTP protocol. If you do not then you will have to prepare that all your super-class servlet functions are defined as final.

2.  Implementing your super-class servlet functions as given:

  • The service() method has to call the _jspService() function.
  • The init() method has to call the jspInit() function.
  • The destroy() method has call jspDestroy() function.

If the above conditions are not present, then a translation error may be given by your JSP engine.

 


Related Discussions:- Describe the life cycle methods of a jsp?

Develop a color picker, Project Description: We need same kind of concep...

Project Description: We need same kind of concept with some changes # Change single colors in a particular design. you need to be able to change the color of only the fox or

Please answer this, Assignment Help >> JAVA Programming Learning Outcomes:...

Assignment Help >> JAVA Programming Learning Outcomes: 1. Use different program control statements in a programming language 2. Demonstrate the use of arrays with a programming

Online Store Website, Project Requirements • Create your own online store ...

Project Requirements • Create your own online store Web site, selling products of your choice. • Create pages that allow you to search and buy available products, as well as add,

What are the parts of website design, What are the parts of website design?...

What are the parts of website design? Parts of web design: There are in 3 types of elements for web design and below are there names: 1. Navigation scheme 2. Overall look and

Design patterns, what is the use of design pattern in java ?

what is the use of design pattern in java ?

Program, a program that groups items according to their number

a program that groups items according to their number

Mark sheet, Ask develop a project in visual basic for student mark-sheet p...

Ask develop a project in visual basic for student mark-sheet processing. #Minimum 100 words accepted#

What is the output of the following javascript code, What is the output of ...

What is the output of the following JavaScript code? name="Ali Akbar"; document.write(name.charAt(4)) ;

What is white space explain proper use of white space java, What is White S...

What is White Space? explain proper use of white space in java? White space consists mainly of the space character in which you generates through hitting the space bar on your

What is publish or subscribe messaging, With publish or subscribe message p...

With publish or subscribe message passing the sending application or client establishes a named topic in the JMS broker or server and publishes messages to this queue. The receivin

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd