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 java application, Modules of software: 1 - Serial RS232 comm p...

Modules of software: 1 - Serial RS232 comm port comunication 2 - NanoHTTPD serving some processed pages 3 - System tray application to indicate status and access configura

Array to store 10messages of type String., Ask1. Storing the Array: Write a...

Ask1. Storing the Array: Write an application that uses an Array to store 10messages of type String. You will store this Array with 10 messages of your choosing. For example, a mes

What is jdbc exactly, What is JDBC exactly? Describe the steps required to ...

What is JDBC exactly? Describe the steps required to execute a SQL query using JDBC.

Program implement class which have main string method, Implement the Money ...

Implement the Money class discussed in class. This class should represent a dollar and cents amount with 0-99 cents and the cents being the same sign as the dollars. The class shou

File handling operation, Write a program called Drivers that displays infor...

Write a program called Drivers that displays information about Formula 1 drivers and their teams.     The program starts by prompting (asking) the user for the name of an input tex

Write down html or javascript code to declare array, Write down HTML or Jav...

Write down HTML or JavaScript code for the following requirements: Declare an Array along with the identifier SUBJECT having length 5. Assign subsequent values to the array par

Implement a java class, Your first task is to implement the Movie class to ...

Your first task is to implement the Movie class to store all the relevant information on a single DVD Movie, including its catalog number, title, year of release, rating, rental pe

Prepare a game in corona, Prepare a Game in Corona (for Android and IOS) ...

Prepare a Game in Corona (for Android and IOS) Project Description: We are looking to prepare a game for mobile platform similar to Zombie Smasher for iOS and Android. Eve

Create a new project in eclipse , Task 1 Create a new project in Eclips...

Task 1 Create a new project in Eclipse called Assignment 1. Within this project create a package called task01. 1/ Download the class Date (you must use this class - no

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