tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vijay Kandy <Vij...@mailcode.com>
Subject RE: Sharing an object between servlets
Date Fri, 04 Oct 2002 15:17:06 GMT
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:
<mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail:
<mailto:tomcat-user-help@jakarta.apache.org>


--
To unsubscribe, e-mail:
<mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail:
<mailto:tomcat-user-help@jakarta.apache.org>

--
To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>


Mime
View raw message