use setAttribute method of ServletContext.
you can find this method from the api docs of Servlet 2.2.
if you are using an old servlet engine, I suggest you change it
with a new one.
regards,
Huimin Wang
Qin Jordan wrote:
> 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
- How can I put my object in ServletContext? Qin Jordan
- Re: How can I put my object in ServletContext? j kandregula
- Servlets and CORBA Huimin Wang
- Servlets and CORBA Paul McKernon
- Re: Servlets and CORBA Paul McKernon
- Re: How can I put my object in ServletContext? Lindsay, William (BIS)
