Return-Path: Delivered-To: apmail-jakarta-tomcat-user-archive@apache.org Received: (qmail 81591 invoked from network); 4 Oct 2002 15:17:35 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 4 Oct 2002 15:17:35 -0000 Received: (qmail 1657 invoked by uid 97); 4 Oct 2002 15:18:01 -0000 Delivered-To: qmlist-jakarta-archive-tomcat-user@jakarta.apache.org Received: (qmail 1626 invoked by uid 97); 4 Oct 2002 15:17:59 -0000 Mailing-List: contact tomcat-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Tomcat Users List" Reply-To: "Tomcat Users List" Delivered-To: mailing list tomcat-user@jakarta.apache.org Received: (qmail 1614 invoked by uid 98); 4 Oct 2002 15:17:58 -0000 X-Antivirus: nagoya (v4218 created Aug 14 2002) Message-ID: <238E33C3D1FFD511A79700D0B7A97A3565BBAC@NOELANI> From: Vijay Kandy To: 'Tomcat Users List' Subject: RE: Sharing an object between servlets Date: Fri, 4 Oct 2002 10:17:06 -0500 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain; charset="iso-8859-1" X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Hmmm. I see what you are saying. But how does the HTML servlet write out the image map data? Thank you. -Vijay -----Original Message----- From: Sexton, George [mailto:gsexton@mhsoftware.com] Sent: Friday, October 04, 2002 9:48 AM To: Tomcat Users List Subject: RE: Sharing an object between servlets I have done what you are attempting. The problem with decoupling as suggested by others is that you end up duplicating the logic to create the image, and the image map. My solution was to have the servlet generate the graphic and save it on the session. The HTML servlet wrote out an image tag to another servlet that did nothing but retrieve the generated session from the image. Perhaps a more scalable approach would be to write the image out as a file, and have a servlet that reads the file. A reference could be saved on the session. George Sexton MH Software, Inc. Home of Connect Daily Web Calendar Software http://www.mhsoftware.com/connectdaily.htm Voice: 303 438 9585 -----Original Message----- From: Vijay Kandy [mailto:VijayK@mailcode.com] 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 - 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: For additional commands, e-mail: -- To unsubscribe, e-mail: For additional commands, e-mail: -- To unsubscribe, e-mail: For additional commands, e-mail: