servlet instance

Discussion in 'Java' started by Asit Dhal, Aug 28, 2011.

  1. Asit Dhal

    Asit Dhal Guest

    Who creates Servlet Instance ??

    when it is created ??

    Is there any chance of creation of multiple instance ??
    Asit Dhal, Aug 28, 2011
    #1
    1. Advertising

  2. Asit Dhal

    Lew Guest

    Asit Dhal wrote:
    > Who creates Servlet Instance ??


    You only need one question mark to indicate an interrogative.

    The servlet container.

    > when it is created ??


    On demand.

    > Is there any chance of creation of multiple instance ??


    Yes.

    --
    Lew
    Lew, Aug 28, 2011
    #2
    1. Advertising

  3. Asit Dhal

    Asit Dhal Guest

    Can you just explain about multiple instance creation ?
    Asit Dhal, Aug 28, 2011
    #3
  4. On 11-08-28 05:55 PM, Asit Dhal wrote:
    > Can you just explain about multiple instance creation ?


    I'd recommend reading the Servlet specification, whichever version (e.g.
    2.5 or 3.0) applies to your selected version of Java EE. There is a
    section in that spec entitled "Number of Instances".

    It has actually been the case as far back as I can remember
    (Servlet<=2.2) that servlet containers create *one* instance of a
    declared servlet per JVM (would be more than one in a distributed
    situation with more than one cluster node).

    It is possible to configure servlets in such a way that the container
    could create multiple instances. Don't do this.

    AHS
    Arved Sandstrom, Aug 28, 2011
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Andy Fish
    Replies:
    4
    Views:
    2,411
    Andy Fish
    Dec 17, 2003
  2. Sean Clarke
    Replies:
    1
    Views:
    1,890
    Sudsy
    Jan 7, 2004
  3. circuit_breaker
    Replies:
    2
    Views:
    1,993
    Jack Jia
    Apr 4, 2004
  4. chamikara
    Replies:
    1
    Views:
    49,856
  5. DiscoStu
    Replies:
    0
    Views:
    498
    DiscoStu
    Jul 8, 2004
Loading...

Share This Page