On page 55 of Jason Hunter's "Java Servlet Programming" book, it says, "It's
generally best to put servlet support classes somewhere in the server's
classpath (such as server_root/classes) where they don't get reloaded."

So, maybe if you put your singleton in a directoy that is in the server's
classpath but doesn't contain your servlet classes, your singleton won't get
reloaded.

Craig Sullivan

-----Original Message-----
From: Johri, Priyank [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 30, 2001 12:55 PM
To: [EMAIL PROTECTED]
Subject: Interservlet Communication


Folks,
This is my second post (didn't get answers to the first one!).
I want to know how to make servlets communicate with each other.
I specifically want to know how I can create a singleton object and access
it
from two different servlets. I tried doing this but it does not work.
It looks like that the servlets are being loaded by different classloaders
or in a different contexts, and the instance of the singleton is not the
same for both.
Any help is appreciated.

Priyank

___________________________________________________________________________
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