Sharing an object between servlets

2002-10-04 Thread Vijay Kandy
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)

RE: Sharing an object between servlets

2002-10-04 Thread Barney Hamish
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

RE: Sharing an object between servlets

2002-10-04 Thread Shapira, Yoav
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

RE: Sharing an object between servlets

2002-10-04 Thread Sexton, George
Web Calendar Software http://www.mhsoftware.com/connectdaily.htm Voice: 303 438 9585 -Original Message- From: Vijay Kandy [mailto:[EMAIL PROTECTED]] Sent: 04 October, 2002 8:28 AM To: 'Tomcat Users List' Subject: Sharing an object between servlets Dear All, We are building a map tool

Re: Sharing an object between servlets

2002-10-04 Thread peter lin
Sounds like you want some kind of persistent storage that cross multiple requests. If I am reading you correctly, rather than have one servlet do both the html and png, you've split the functionality into two servlets. Assuming you're using tomcat 4, you should be able to create a light-weight

RE: Sharing an object between servlets

2002-10-04 Thread Vijay Kandy
be accessible to the image servlet? Thank you, -Vijay -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED]] Sent: Friday, October 04, 2002 9:42 AM To: Tomcat Users List Subject:RE: Sharing an object between servlets File: ATT196478.txt File: ATT196479.txt Hi

RE: Sharing an object between servlets

2002-10-04 Thread Vijay Kandy
of Connect Daily Web Calendar Software http://www.mhsoftware.com/connectdaily.htm Voice: 303 438 9585 -Original Message- From: Vijay Kandy [mailto:[EMAIL PROTECTED]] Sent: 04 October, 2002 8:28 AM To: 'Tomcat Users List' Subject: Sharing an object between servlets Dear All, We

RE: Sharing an object between servlets

2002-10-04 Thread Shapira, Yoav
Hi, The number of coordinates is huge - in thousands so cant put them in the URL. OK. Makes sense ;) I have attempted your second idea. And yes I go to the DB for each request. The problem with the Singleton is, I donno who should start the class. If the HTML servlet starts the Singleton,

Re: Sharing an object between servlets

2002-10-04 Thread peter lin
I've built something similar to this in the past. In my case, I was using a popular enterprise mapping API to generate the maps with points of interest (easy to guess which one). I stored long/lat of a user's recent published locations in the database. IE, the user has some kind of mobile

RE: Sharing an object between servlets

2002-10-04 Thread Sexton, George
://www.mhsoftware.com/connectdaily.htm Voice: 303 438 9585 -Original Message- From: Vijay Kandy [mailto:[EMAIL PROTECTED]] Sent: 04 October, 2002 9:17 AM To: 'Tomcat Users List' Subject: RE: Sharing an object between servlets Hmmm. I see what you are saying. But how does the HTML servlet write

RE: Sharing an object between servlets

2002-10-04 Thread Vijay Kandy
I think I have an idea now. Thank you Sexton, Lin and Shapira! -Vijay -Original Message- From: Sexton, George [mailto:[EMAIL PROTECTED]] Sent: Friday, October 04, 2002 10:26 AM To: Tomcat Users List Subject:RE: Sharing an object between servlets Go to: http