tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Len Popp" <len.p...@gmail.com>
Subject Re: Tomcat and cookies caching issue
Date Thu, 26 Jul 2007 18:04:07 GMT
I don't think Tomcat caches cookie values. I could be wrong about
this, but it seems to me that Tomcat just gets the cookie value from
the request sent by the browser.

Maybe you should log the value of the cookie in various different
spots so you can follow the cookie's progress and see where it gets
mixed up. Places where you could log or view the cookie are:
- in your app where it creates and uses the cookie values
- in the access log for both Tomcat and Apache (the docs describe how
to log cookie values)
- in the browser, using a tool like LiveHTTPHeaders or ieHTTPHeaders
-- 
Len

On 7/26/07, Riccardo <riccardo.andretta@gmail.com> wrote:
> Hi,
> I'm experiencing a problem with cookies cached - probably - in Tomcat
> for a couple of minutes.
> I'm running a webapp into Tomcat, which also connects to an apache
> proxy to embed an external page into the tomcat webapp. I need the
> apache proxy to get rid of the Javascript safety problems that occur
> when trying to interact with a page sourced from another domain name.
> The problem: I run in the externally source page a report, setting a
> few parameters. These parameters with my selected values are stored in
> a cookie called "Reports". After running the report I can click on a
> link to export it to excel. The asp script on the remote server will
> retrieve the params values from the cookie and generate the
> appropriate excel sheet. Now if after running a report I run another
> one, the cookie on my browser gets correctly updated, but if after
> that I try to export to excel this new report what I get from the
> remote server is the same excel sheet as before. I checked the Reports
> cookie on my browser and I see it's correctly updated after each
> report run, but i noticed that what is sent to the remote server is
> not the cookie stored in my browser, but a previous cookie, cached - i
> suppose - in Tomcat, because the generated excel sheet is the same as
> before, as the first report i've run. If i wait two minutes though and
> click again the excel export function, the correct sheet is built. So
> looks like Tomcat caches the Reports cookie for two minutes and this
> overrides the browser cookie.
> Another confirmation of this is that if I delete the Reports cookie
> from my browser after running a report, and click on export to excel,
> I still get the excel sheet, whereas after a couple of minutes the
> sheet can't be built anymore and some microsoft runtime error is
> generated.
>
> I was first thinking that it could be the apache proxy to cause this,
> so i tried to shut it down and up again after running a report and
> before trying to export it to see if it lost the cookie value in its
> cache, but this was not the case, so I ended up assuming the caching
> is happening inside Tomcat.
>
> I'm using Tomcat 5.0.28 and apache http server 2.2.4.
>
> Any suggestion will be much appreciated as i've alredy wasted a lot of
> time on this issue!!
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message