There are many task happening internally inside the Web-Server. Following are the list of task performed at the container start-up :

1. Reads the web.xml file or Annotations specified on various web components and stores all the required information in the main memory.

2. Container creates the ServletContext object and initialized with ServletContext object parameter specified in the web.xml file.

3. Thread Pool will be created by the container.

4. All the listener will be initialized.

5. All the filter will be initialized.

6. Checks whether any servlet is configured with < load-on-startup > tag must be loaded first and the instance will be created by calling the default constructor.
    For ex: Servlet confiured with < load-on-startup > value ' 1' is loaded first.

7. If no < load-on-startup > tag is mentioned then loads the servlet class when request will come.

8. Container creates the ServletConfig object and initialized it with the ServletConfig parameter specified in the web.xml file or Annotation.

9.  ServletConfig object will be initliazed with the ServletContext object.

10. Finally after creating all the instance and initialization the ServletLife cycle method will be called by the container and first to call is init() by passing ServletConfig instance as parameter.

Note : 

* Init() method is internally called by the container to initialize the ServletConfig instance with the required parameters.

* If any of the process failed before loading and initializing the servlet class then class will not be loaded and initialized.



Related Posts:

  • ServletContext Object in Servlet ServletContext is only a single object to a whole Servlet Application. It is once created and initialized by the web container at the container start-up. A Web application has many Servlet classes and for every servlet… Read More
  • HttpSession Object in Servlet In servlet we are getting the session Object in terms of HttpSession by calling getSession() method with the HttpServletRequest object. What is a session ? Session is a object which uniquely identifies the active user so t… Read More
  • ServletConfig Object in Servlet ServletContext object is common to all the servlet but ServletConfig object is different for all the servlets and must be created at the time of container start-up for every Servlet. ServletConfig object of one servlet is a… Read More
  • What Happens at Container Start-Up in Servlet There are many task happening internally inside the Web-Server. Following are the list of task performed at the container start-up : 1. Reads the web.xml file or Annotations specified on various web components and stores al… Read More
  • What is a Web Container After developing Servlet Application we need to deploy and run our application at theWeb-Server. When a Web-server starts it internally starts a web-container which is also termed as servlet container.  What is a we… Read More

0 comments:

Post a Comment

Ads 468x60px

.

Ads

.

Featured Posts

Popular Posts

Like Us On FaceBook

Total Pageviews

201976

Online Members

Live Traffic