Results 1 to 2 of 2
  1. #1
    pcvardhan is offline Member
    Join Date
    Jun 2008
    Posts
    1
    Rep Power
    0

    Default Basics of Servlet

    When does the init() method of the servlet get called:-
    When first equest comes to the servlet or when it get deplolyed.

  2. #2
    javarishi is offline Member
    Join Date
    Apr 2008
    Posts
    91
    Rep Power
    0

    Default

    It depends on the Configuration which we did in the web.xml.

    If we put load on startup tag inside web.xml and if we mention the

    particular servlet inside this tag, at the time of server startup, web -

    container will load the servlet class into the memory, and webcontainer

    will create the servlet instance by calling the default

    constructor. After that container will initialize this servlet by calling init()

    method. So All initialization code we can put inside init tag inside the

    web.xml, get the ServletConfig Object. These properties of the servlet


    will be shared among the clieants.

Similar Threads

  1. Doubt in basics of Servlets
    By pooja.gupta84 in forum Java Servlet
    Replies: 4
    Last Post: 06-24-2008, 06:32 PM
  2. Basics
    By AKP in forum New To Java
    Replies: 7
    Last Post: 05-23-2008, 12:06 PM
  3. regading jsp basics
    By lpwing in forum JavaServer Pages (JSP) and JSTL
    Replies: 0
    Last Post: 01-21-2008, 07:52 AM
  4. Session Beans (basics)
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 12-28-2007, 10:43 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •