Results 1 to 6 of 6

Thread: What does preinitialization means in Java Servlet?

  1. #1
    Join Date
    Dec 2009
    Posts
    12

    What does preinitialization means in Java Servlet?

    I am beginner(fresher) programmer in the programming world. Right now i am learning t he programming language like C sharp, C++, Java, SQL and PHP. I just love to do programming everyday and learn new-new things. I want to develop a mini project in Java using the Servlet. But before that i want know what does servlet preinitialization means? Please help me.

  2. #2
    Join Date
    Nov 2005
    Posts
    1,323

    Re: What does preinitialization means in Java Servlet?

    I am also learning the Java programming language right now,and i have studied that, the Servlet Preinitialization means providing the servlet initialization beforehand (i.e. having a servlet initialized before being requested to service an incoming request.) In simple words, the process of loading a servlet before any request comes in is called preloading or preinitializing a servlet. Hope you will understand the term Servlet Preinitialization.

  3. #3
    Join Date
    Oct 2005
    Posts
    2,393

    Re: What does preinitialization means in Java Servlet?

    According to me, the Servlet can be loaded into the servlet container of web or application server at the time of first request sent to
    that servlet. This possible by preinitialization method. If we want to preinitialize the servlet, then we have to use <load-on-startup>tag written in web.xml. Thus my using this tag, servlet is initialized at the time of server start (which is known as Servlet Preinitialization). Hope your problem will be solved.

  4. #4
    Join Date
    May 2008
    Posts
    2,389

    Re: What does preinitialization means in Java Servlet?

    Good question ask by you friend. My knowledge says that a container does not initialize the servlet's at the time of starts up, and it will initialize a servlet whenever it receives/gets a request for that servlet first time. This is known as lazy loading. But servlet mechanism defines a tag called <load-on-startup>, that can be wrote in the deployment descriptor to allow the servlet container load and initialize the servlet at the time of starts up. This process/method of loading a servlet before any request comes in is known as preloading or preinitializing a servlet. Hope your problem is fix.

  5. #5
    Join Date
    Feb 2008
    Posts
    1,852

    Re: What does preinitialization means in Java Servlet?

    I think that in Java, the servlet can be easily preloaded/preinitialized and reason behind doing this is lazy loading of the servlets. The servlet has a element called as "load-on-startup" and mention this tag inside the .xml file and servlet can be initialized at time of startup.Thus preloading of a servlet before any user's request is called servlet preinitialization. Hope you will be able to get the meaning of Servlet Preinitialization.

  6. #6
    Join Date
    Jan 2008
    Posts
    1,521

    Re: What does preinitialization means in Java Servlet?

    I would say that the servlets are lazily loaded in servlet container of web or application server. This becomes one of the negative point in using the servlets. But to overcome this negative point there is way and the way is to use the <load-on-startup>element provided by servlet's and write this inside web.xml file. By doing this, servlets are loaded at the time of startup, and this process or method is known as "preinitialization" of servlet.

Similar Threads

  1. JSP and Servlet problem
    By Devabrata in forum Software Development
    Replies: 5
    Last Post: 21-07-2010, 12:12 AM
  2. Servlet Mapping in Java
    By Adrina_g in forum Software Development
    Replies: 4
    Last Post: 27-02-2010, 06:53 PM
  3. Difference between Servlet & ASP
    By Owen Fernandes in forum Software Development
    Replies: 5
    Last Post: 05-02-2010, 10:53 AM
  4. What is Servlet container?
    By Sonam Goenka in forum Software Development
    Replies: 5
    Last Post: 05-02-2010, 08:13 AM
  5. What does the Deadlocks means in Java?
    By Zoey Mod in forum Software Development
    Replies: 5
    Last Post: 27-01-2010, 11:45 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,274,147.57099 seconds with 16 queries