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
Hi,
There are many ways you can do this. Here are two examples:
1. Since the HTML servlet embeds the URL of the PNG servlet, why not put
the coordinates in the URL? E.g. have the HTML servlet output
img src=myPngServlet?x1=0x2=1 and then the PNG servlet does
String x1 =
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
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
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
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
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,
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
://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
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
10 matches
Mail list logo