I think this will solve your problem, add this in your response handler:

         response.addHeader("Pragma", "no-cache");
         response.addHeader("Cache-Control", "no-store");

This should do the trick.

Regards,

the elephantwalker



-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Todd McGrath
Sent: Wednesday, May 30, 2001 11:25 AM
To: Orion-Interest
Subject: image/servlet caching issue


I'm having what I believe to be a image/servlet issue cache issue with Orion
1.4.5:

Situation:
I'm creating dynamically generated graphs based on an authenticated user.
The images are created by passing values to a graph generating servlet.

HTML looks like this:

<img border="0"
src="/Incentive1Graph?mgmt01=37500&min=10009&target=25024&gold=37535">

where Incentive1Graph is a servlet that produces the image based on mgmt01,
min, target and gold values.

The very first time the servlet is run it produces the correct image.
However, on any subsequent calls with a different user, the original image
is returned.  I think the image/servlet is being cached by Orion and thus,
always returns the first image that was created.  If I restart Orion, log in
with a different user, the image produced is correct.

Here's what I've done to debug so far:

1) Verfied the values for mgmt01, min, etc. are changing with different
users
2) Deleted all files in the persistence directory
3) Deleted my browser cache
4) Tried with both Netscape and IE
5) Verified that I'm not accessing the test site through a proxy
6) Searched the Orion mailing list for similar issues

Any other ideas???

My questions are:
1) how do disable image/servlet caching in Orion config?
2) is there something I can write in the Incentive1Graph servlet that will
prevent it from being cached?


Thanks in advance,
Todd



Reply via email to