Hi Carl,
many thanks, I also put these lines in my header.jsp, it seems to work. How
Hans wrote, I also made the experience, that the pragma-Tag doesn't work
with my proxy. But the Cache-Control seems to be the right way.
Thanks.
Regards,
Christine 

-----Ursprüngliche Nachricht-----
Von: Carl [mailto:[EMAIL PROTECTED] 
Gesendet: Dienstag, 18. November 2003 23:44
An: Struts Users Mailing List
Betreff: Re: avoid proxy-caching by generating changing urls

Hi,

I'm using Struts with Tomcat 4.1. If you disable cookies in your tomcat 
context, all your ULR will be rewritten with a jsessionid. So the proxy 
issue should be solve. However I don't know If there is a way to enable 
cookies AND be sure that the proxy's cache is disable.

In my project I use this in all jsp I won't be in any cache :

<%
        response.setHeader("pragma", "no-cache");
        response.setHeader("Cache-control", "no-cache, no-store");
        response.setHeader("Expires", "0");
%>

<head>  
        <meta http-equiv="pragma" content="no-cache">
        <meta http-equiv="cache-control" content="no-cache">
</head>


It seems to work for me but I'm sure there are more élégant solutions. 
Using Struts, you see on the <bean:header> tag. I still haven't found 
time to explore it. Let me know if it's work for you.

Carl



Christine Gerstenmayer wrote:
> Hi all !
> 
> My application is running behind a proxy which caches everything, if the
url
> is the same.
> 
>  
> 
> It's no use that I have this in each Jsp:
> 
> <meta http-equiv="pragma" content="no-cache">
> 
>  
> 
> Therefore I used the Struts-property
> 
> <controller nocache="true"/>
> 
>  
> 
> But it was not that I expected:
> 
> My Login-Site has this URL:
> 
>
http://localhost:8080/lager/Welcome.do;jsessionid=0146C3084A50F84EDEE81FE78E
> E56DAE?action=toLogin - is ok.
> 
> But when I make login, the next URL has no jsessionid:and therefore it is
> always the same:
> 
> http://localhost:8080/lager/Login.do?action=makeLogin
> 
>  
> 
> Is it possible to avoid proxy-caching with Struts by changing each URL
with
> appendig a random-number or such a thing ?
> 
>  
> 
> Please give me a tip.
> 
> Thanks in advance for your help.
> 
> Best regards.
> 
> Christine
> 
>  
> 
> 


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




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

Reply via email to