struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cedric Dumoulin <ced...@apache.org>
Subject Re: Problem with Struts Template and proxy caching
Date Tue, 17 Dec 2002 17:25:59 GMT

  Hi,

  I think that once the response is committed, you can't change the 
response's header (check the spec).
  So, if you set the header after the template is inserted, the change 
has no effect because the insert commit the response.

       Cedric

dumps wrote:

>Hi everyone,
>
>we are facing a problem with Struts templates (Struts 1.02) and proxy
>caching :
>
>The response headers we are setting in jsp files are not being sent back to
>the browser whenever a template:insert tag is used :
>
>...
>   <template:insert template='Template.jsp'>
>     <template:put name='navigation' content='/navigation.jsp'/>
>     <template:put name='header'     content='/blankHeader.jsp'/>
>     <template:put name='content'    content='/mainMenuContent.jsp'/>
>   </template:insert>
>...
>  
>
> <%
>    response.addHeader("Cache-Control","no-cache"); 
>    response.addHeader("Pragma","no-cache"); 
>    response.setDateHeader ("Expires", 0);
>    response.setHeader("Hello", "hello123");
> %>
>
>
>If we remove the template tags, everything's ok with the headers... (we are
>checking the http headers using a local proxy server). We also tried to set
>nocache to
>'true' in web.xml and/or add the response headers inside the Template.jsp
>file,
>but neither solved the problem. That's why we assume the templating
>mechanism is messing with the headers.
>
>
>Thanks for your time,
>Christof
>
>  
>


--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@jakarta.apache.org>


Mime
View raw message