Can't you use a session/request scope object? However it's not clear to me why you need to share the variables between the servlets without having them communicate directly.
Hamish > -----Original Message----- > From: Vijay Kandy [mailto:[EMAIL PROTECTED]] > Sent: Friday, October 04, 2002 4:28 PM > To: 'Tomcat Users List' > Subject: Sharing an object between servlets > > > > Dear All, > > We are building a map tool - to draw maps and show some data > on them. Now, I > have this situation. I have a servlet that gets coordinates from the > database and draws the map on its OutputStream (the content > type is set to > png image). There is another servlet (content type is > text/html) that embeds > the URL of the first servlet. This servlet also gets > coordinates from the > database, and populates them over the image so I can do some > image map or > mouseOver() tricks using javascript. I was wondering if there > was a way to > make just one call to the database and share the coordinates > between the > servlets. Right now, I will try any thing! > > Thank you, > Vijay > > > -- > To unsubscribe, e-mail: > <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: > <mailto:[EMAIL PROTECTED]> > -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>