I have a class which I put in the
servlet directory of the web server (Netscape IPlanet).
Now I have two identical servlets (named differently of course) which access the TestClass class. Both are as follows:
Running the two identical servlets shows that each are in the same context, but each has a different timestamp. I was hoping to get the same timstamp for each, which would show that I am using the same instance of the object in both servlets. Instead it appears that two separate instances of the object are being instantiated.
I know that I could effectively share this object by placing it in the ServletContext and accessing it that way, but that's not the point. I am more curious as to WHY there are different instances of the object being created. Anyone have any ideas?
Thanks,
Jay
[This message has been edited by Jason Menard (edited February 20, 2001).]
[This message has been edited by Jason Menard (edited February 20, 2001).]