You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Slimane Zouggari <sl...@clin.ucl.ac.be> on 2002/03/27 17:17:34 UTC
Problem with caching
Hi,
When I try to follow a link to one of My action class. Sometimes, it works
correctly and sometimes, my browser just take the old copy of the generated
page it has in cache.
My question is: How can I avoid that ? What do I have to do to be sure my
browser doesn't set anything in cache ?
I tried to put the following in my jsp pages, without any success:
<%
response.addHeader("pragma","no-cache"); // http v1.0
response.addHeader("cache-control","no-cache"); // http v1.1
%>
Could anybody point me to the right way to achieve that ?
Thanks in advance.
Friendly Regards,
Slimane
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: Problem with caching
Posted by Slimane <z...@skynet.be>.
Thanx, I'll try
At 17:35 27/03/2002 +0100, Christian Bouessay wrote the following
>For all actions, you could configure the ActionServlet in web.xml, like this:
>...
><init-param>
> <param-name>nocache</param-name>
> <param-value>true</param-value>
> </init-param>
>...
>
>
>--
>C. Bouessay
>
>Slimane Zouggari wrote:
>
>>Hi,
>>
>>When I try to follow a link to one of My action class. Sometimes, it
>>works correctly and sometimes, my browser just take the old copy of the
>>generated page it has in cache.
>>
>>My question is: How can I avoid that ? What do I have to do to be sure my
>>browser doesn't set anything in cache ?
>>
>>I tried to put the following in my jsp pages, without any success:
>>
>><%
>> response.addHeader("pragma","no-cache"); // http v1.0
>> response.addHeader("cache-control","no-cache"); // http v1.1
>>%>
>>
>>Could anybody point me to the right way to achieve that ?
>>
>>Thanks in advance.
>>
>>Friendly Regards,
>>Slimane
>>
>>
>>--
>>To unsubscribe, e-mail:
>><ma...@jakarta.apache.org>
>>For additional commands, e-mail: <ma...@jakarta.apache.org>
>>
>
>
>
>
>--
>To unsubscribe, e-mail: <ma...@jakarta.apache.org>
>For additional commands, e-mail: <ma...@jakarta.apache.org>
>
--
Make it run, Make it right, Make it fast
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: Problem with caching
Posted by Christian Bouessay <cb...@businessdecision.com>.
For all actions, you could configure the ActionServlet in web.xml, like
this:
...
<init-param>
<param-name>nocache</param-name>
<param-value>true</param-value>
</init-param>
...
--
C. Bouessay
Slimane Zouggari wrote:
> Hi,
>
> When I try to follow a link to one of My action class. Sometimes, it
> works correctly and sometimes, my browser just take the old copy of
> the generated page it has in cache.
>
> My question is: How can I avoid that ? What do I have to do to be sure
> my browser doesn't set anything in cache ?
>
> I tried to put the following in my jsp pages, without any success:
>
> <%
> response.addHeader("pragma","no-cache"); // http v1.0
> response.addHeader("cache-control","no-cache"); // http v1.1
> %>
>
> Could anybody point me to the right way to achieve that ?
>
> Thanks in advance.
>
> Friendly Regards,
> Slimane
>
>
> --
> To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
>
>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>