ServletContext sc = getServletContext();
        sc.setAttribute("e401k-pool", connectionPool);

Bill Lindsay
Benefits and Investment Solutions
401(k) Infrastructure Automation

-----Original Message-----
From: Qin Jordan [mailto:[EMAIL PROTECTED]]
Sent: None
To: [EMAIL PROTECTED]
Subject: How can I put my object in ServletContext?


How can I put my object in ServletContext? I checked the API, but found out that there 
is only getter functions in the
ServletContext interface.

Thanks in advance,

Jordan


Huimin Wang wrote:

  Marakannu Marakannu wrote:

  >
  >
  > You can put your singleton object in ServletContext and any Servlet running in the 
same web server can access
  it.
  >

  Thank you very much.
  I solved my problem by using ServletContext .

  Best regards,
  Huimin Wang

  >
  > reg,
  > marakkannu
  >
  > -----Original Message-----
  > From: Huimin Wang [mailto:[EMAIL PROTECTED]]
  > Sent: Monday, February 05, 2001 12:08 PM
  > To: [EMAIL PROTECTED]
  > Subject: all servlets running at the same Java VM ?
  >
  > I have some servlet programs, I want they can share a Singleton object,
  > But I failed that.
  >
  > Can anyone tell me how can I share a Singleton object with all of my servlets?
  > and if all of the servlets in an application running at the same JVM?
  >
  > Thanks a lot.
  >
  > Huimin Wang
  >
  > ___________________________________________________________________________
  > To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
  > of the message "signoff SERVLET-INTEREST".
  >
  > Archives: http://archives.java.sun.com/archives/servlet-interest.html
  > Resources: http://java.sun.com/products/servlet/external-resources.html
  > LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

  ___________________________________________________________________________
  To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
  of the message "signoff SERVLET-INTEREST".

  Archives: http://archives.java.sun.com/archives/servlet-interest.html
  Resources: http://java.sun.com/products/servlet/external-resources.html
  LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to