ServletContext.setAttribute and ServletContext.getAttribute()

Discussion in 'Java' started by jazzdman@gmail.com, Mar 27, 2005.

  1. Guest

    Hi,
    If I put an attribute into "application" scope with the
    ServletContext.setAttribute() method, and multiple objects call
    ServletContext.getAttribute(), what happens? Does getAttribute return
    multiple references, copies of the same object, or does it simply conk
    out?


    Thanks,


    Jason Mazzotta
     
    , Mar 27, 2005
    #1
    1. Advertising

  2. Wendy S Guest

    <> wrote:
    > If I put an attribute into "application" scope with the
    > ServletContext.setAttribute() method, and multiple objects call
    > ServletContext.getAttribute(), what happens?


    Each call to context.getAttribute() returns a reference to the object you
    stored in Application scope.

    --
    Wendy
     
    Wendy S, Mar 27, 2005
    #2
    1. Advertising

  3. Guest

    Thanks for the reply. One more question answered.

    Jason
     
    , Mar 27, 2005
    #3
    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. DN
    Replies:
    2
    Views:
    11,785
  2. Replies:
    3
    Views:
    2,882
  3. Matt
    Replies:
    7
    Views:
    14,790
    John C. Bollinger
    Nov 8, 2004
  4. ICPooreMan
    Replies:
    4
    Views:
    125
    Wenzel.Peppmeyer
    Apr 7, 2007
  5. Jeremy J Starcher
    Replies:
    8
    Views:
    232
    Jorge
    Apr 8, 2010
Loading...

Share This Page