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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tag for adding no-cache header.
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 [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tag for adding no-cache header.
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 [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tag for adding no-cache header.
In your deployment descriptor, web.xml, you can can set the ActionServlet's parameter no-cache=true. The container will take care of this for you as long as all of your request go through the FrontController. Danny Trieu Internet Business Group Downey Savings and Loan Association, F.A. [EMAIL PROTECTED] (949) 509-4564 The beginning of knowledge is the discovery of something we do not understand. - Frank Herbert (1920-1986) The essence of knowledge is, having it, to apply it; not having it, to confess your ignorance. - Confucius (551-479 BC) -Original Message- From: Antony Paul [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 10, 2003 3:16 AM To: struts Subject: 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This message and any attachments are for the intended recipient(s) only and may contain privileged, confidential and/or proprietary information about Downey Savings or its customers, which Downey Savings does not intend to disclose to the public. If you received this message by mistake, please notify the sender by reply e-mail and delete the message and attachments. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tag for adding no-cache header.
Setting the nocache in the web.xml has actually been deprecated. A better solution for you is to set the nocache header as an attribute inside the controller element of you struts-config file. -Jonathan -Original Message- From: Trieu, Danny [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 10, 2003 11:31 AM To: 'Struts Users Mailing List' Subject: RE: Tag for adding no-cache header. In your deployment descriptor, web.xml, you can can set the ActionServlet's parameter no-cache=true. The container will take care of this for you as long as all of your request go through the FrontController. Danny Trieu Internet Business Group Downey Savings and Loan Association, F.A. [EMAIL PROTECTED] (949) 509-4564 The beginning of knowledge is the discovery of something we do not understand. - Frank Herbert (1920-1986) The essence of knowledge is, having it, to apply it; not having it, to confess your ignorance. - Confucius (551-479 BC) -Original Message- From: Antony Paul [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 10, 2003 3:16 AM To: struts Subject: 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This message and any attachments are for the intended recipient(s) only and may contain privileged, confidential and/or proprietary information about Downey Savings or its customers, which Downey Savings does not intend to disclose to the public. If you received this message by mistake, please notify the sender by reply e-mail and delete the message and attachments. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tag for adding no-cache header.
1- Does someone know precisely what headers are added to HTTP responses when adding the following to the controller element of the struts-config file ? set-property property=nocache value=true/ 2- I am currently using the following to disable user-agent cache inside of my Struts Actions. Does anyone know if the solution mentionned in (1) is better than the solution I am using ? // Set to expire far in the past. response.setHeader(Expires, -1); // Set standard HTTP/1.1 no-cache headers. response.setHeader(Cache-Control, no-store, no-cache, must-revalidate); // Set IE extended HTTP/1.1 no-cache headers (use addHeader). response.addHeader(Cache-Control, post-check=0, pre-check=0); // Set standard HTTP/1.0 no-cache header. response.setHeader(Pragma, no-cache); Sylvain - Original Message - From: Fullam, Jonathan [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Sent: Wednesday, December 10, 2003 11:34 AM Subject: RE: Tag for adding no-cache header. Setting the nocache in the web.xml has actually been deprecated. A better solution for you is to set the nocache header as an attribute inside the controller element of you struts-config file. -Jonathan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tag for adding no-cache header.
If I remember correctly, I think the request processor did exactly what you did on 2. And I think (1) approach is better and it consistent with MVC. Just make sure that all of your request will go through the FrontController then all of your response will have it header set with no-cache. --danny Danny Trieu Internet Business Group Downey Savings and Loan Association, F.A. [EMAIL PROTECTED] (949) 509-4564 The beginning of knowledge is the discovery of something we do not understand. - Frank Herbert (1920-1986) The essence of knowledge is, having it, to apply it; not having it, to confess your ignorance. - Confucius (551-479 BC) -Original Message- From: Sylvain Cliche [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 10, 2003 9:23 AM To: Struts Users Mailing List Subject: Re: Tag for adding no-cache header. 1- Does someone know precisely what headers are added to HTTP responses when adding the following to the controller element of the struts-config file ? set-property property=nocache value=true/ 2- I am currently using the following to disable user-agent cache inside of my Struts Actions. Does anyone know if the solution mentionned in (1) is better than the solution I am using ? // Set to expire far in the past. response.setHeader(Expires, -1); // Set standard HTTP/1.1 no-cache headers. response.setHeader(Cache-Control, no-store, no-cache, must-revalidate); // Set IE extended HTTP/1.1 no-cache headers (use addHeader). response.addHeader(Cache-Control, post-check=0, pre-check=0); // Set standard HTTP/1.0 no-cache header. response.setHeader(Pragma, no-cache); Sylvain - Original Message - From: Fullam, Jonathan [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Sent: Wednesday, December 10, 2003 11:34 AM Subject: RE: Tag for adding no-cache header. Setting the nocache in the web.xml has actually been deprecated. A better solution for you is to set the nocache header as an attribute inside the controller element of you struts-config file. -Jonathan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This message and any attachments are for the intended recipient(s) only and may contain privileged, confidential and/or proprietary information about Downey Savings or its customers, which Downey Savings does not intend to disclose to the public. If you received this message by mistake, please notify the sender by reply e-mail and delete the message and attachments. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tag for adding no-cache header.
Am Mittwoch, 10. Dezember 2003 18:30 schrieb Trieu, Danny: If I remember correctly, I think the request processor did exactly what you did on 2. And I think (1) approach is better and it consistent with MVC. Just make sure that all of your request will go through the FrontController then all of your response will have it header set with no-cache. --danny AFAIK Struts issues only the 'standard three' set of NoCache directions, so the IE extensions are not there. The same is true for the endless list of cache control headers when proxies come into play. The details are laid out in RFC 2616 (Section 13, p. 108ff.), if you're after some pretty dry reading stuff. Don't know if this is really necessary, but just to make sure, I also have a 'proxy-revalidate' attribute in my Cache-control headers and usually use a custom tag for such things. The reason behind is not so much because Struts doesn't work (it works fine, actually), but because of the fact that setting the nocache attribute is an all-or-nothing solution, and not all 'dynamic' pages, in particular the ones consisting of more or less static text, really change that often and therefore may safely be cached for performance reasons. Then, I somewhat suspect that cache control headers *might* confuse caching web spiders like the GoogleBot. Using Tiles anyway, I usually put the tag in the master template for the non-cachable parts and then just forget about it. YMMV. -- Chris. NB. Another option is using a filter for cache control, enabling one to forbid caching only for certain paths. Recent Resin versions have some interesting options in this direction, but I never actually tried them out yet. Danny Trieu Internet Business Group Downey Savings and Loan Association, F.A. [EMAIL PROTECTED] (949) 509-4564 -- CLIP! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tag for adding no-cache header.
On 12/10/2003 09:18 PM Christian Bollmeyer wrote: AFAIK Struts issues only the 'standard three' set of NoCache directions, so the IE extensions are not there. The same is true from wget -S 3 Pragma: No-cache 4 Cache-Control: no-cache 5 Expires: Thu, 01 Jan 1970 00:00:00 GMT Adam -- struts 1.1 + tomcat 5.0.16 + java 1.4.2 Linux 2.4.20 Debian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]