You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Antony Paul <an...@hotmail.com> on 2003/12/10 12:16:13 UTC
Tag for adding no-cache header.
Hi,
Does any Struts tag generate the headers necessary to say browser not to
cache a JSP page. It still exists as a scriptlet in my JSP. If one is added
it will be useful. I think every dynamic page need this.
rgds
Antony Paul.
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
Re: Tag for adding no-cache header.
Posted by Adam Hardy <ah...@cyberspaceroad.com>.
That xml config tells the struts servlet to put those headers in all
responses. If you want to control the headers differently per page, then
I guess it won't help. There is no struts taglib to do it, but there may
be a jakarta commons-taglib taglib. I'm not sure.
Adam
On 12/10/2003 01:38 PM Antony Paul wrote:
> pls explain. I want to put header in JSP's. The values are //to
> prevent page-caching in client
> response.addHeader("pragma","No-cache");
> response.addHeader("Cache-Control","no-cache");
> response.addDateHeader("Expires",0);
>
> rgds Antony Paul.
>
> ----- Original Message ----- From: "Adam Hardy"
> <ah...@cyberspaceroad.com> To: "Struts Users Mailing List"
> <st...@jakarta.apache.org> Sent: Wednesday, December 10, 2003
> 5:33 PM Subject: Re: Tag for adding no-cache header.
>
>
>
>> On 12/10/2003 12:16 PM Antony Paul wrote:
>>
>>> Hi, Does any Struts tag generate the headers necessary to say
>>> browser not to cache a JSP page. It still exists as a scriptlet
>>> in my JSP. If one is added it will be useful. I think every
>>> dynamic page need this.
>>>
>>> rgds Antony Paul.
>>
>> Put this tag inside the controller tag in your struts-config:
>>
>> <set-property property="nocache" value="true"/>
>>
>>
>> Adam
--
struts 1.1 + tomcat 5.0.16 + java 1.4.2
Linux 2.4.20 Debian
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
Re: Tag for adding no-cache header.
Posted by Antony Paul <an...@hotmail.com>.
pls explain. I want to put header in JSP's. The values are
//to prevent page-caching in client
response.addHeader("pragma","No-cache");
response.addHeader("Cache-Control","no-cache");
response.addDateHeader("Expires",0);
rgds
Antony Paul.
----- Original Message -----
From: "Adam Hardy" <ah...@cyberspaceroad.com>
To: "Struts Users Mailing List" <st...@jakarta.apache.org>
Sent: Wednesday, December 10, 2003 5:33 PM
Subject: Re: Tag for adding no-cache header.
> On 12/10/2003 12:16 PM Antony Paul wrote:
> > Hi,
> > Does any Struts tag generate the headers necessary to say browser
not to
> > cache a JSP page. It still exists as a scriptlet in my JSP. If one is
added
> > it will be useful. I think every dynamic page need this.
> >
> > rgds
> > Antony Paul.
>
> Put this tag inside the controller tag in your struts-config:
>
> <set-property property="nocache" value="true"/>
>
>
> Adam
>
> --
> struts 1.1 + tomcat 5.0.16 + java 1.4.2
> Linux 2.4.20 Debian
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
Re: Tag for adding no-cache header.
Posted by Adam Hardy <ah...@cyberspaceroad.com>.
On 12/10/2003 12:16 PM Antony Paul wrote:
> Hi,
> Does any Struts tag generate the headers necessary to say browser not to
> cache a JSP page. It still exists as a scriptlet in my JSP. If one is added
> it will be useful. I think every dynamic page need this.
>
> rgds
> Antony Paul.
Put this tag inside the controller tag in your struts-config:
<set-property property="nocache" value="true"/>
Adam
--
struts 1.1 + tomcat 5.0.16 + java 1.4.2
Linux 2.4.20 Debian
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org