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:[EMAIL PROTECTED]] 
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:[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 - 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]>

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to