Sorry, I have sent the message directy to Costas :-(
posting again in list...
----- Original Message -----
From: "Andrea Papotti" <[EMAIL PROTECTED]>
To: "Costas Stergiou" <[EMAIL PROTECTED]>
Sent: Tuesday, August 07, 2001 6:10 PM
Subject: Re: Browser cache control
> Modified TurbineResource.properties:
>
> ---
> #tool.request.link=org.apache.turbine.util.template.TemplateLink
> tool.request.link=org.apache.turbine.mods.template.TemplateLinkEx
> ---
>
> Added TemplateLinkEx :
>
> ---
> package org.apache.turbine.mods.template;
>
> import org.apache.turbine.util.template.TemplateLink;
>
> import org.apache.turbine.util.RunData;
> import org.apache.turbine.util.ServerData;
>
> import java.util.Date;
>
> public class TemplateLinkEx extends
> org.apache.turbine.util.template.TemplateLink {
> public TemplateLinkEx() {
> super();
> System.out.println("noargs");
> }
>
> public TemplateLinkEx(RunData data)
> {
> super(data);
> addPathInfo("nocacheid", new java.util.Date().getTime());
> System.out.println("rundata");
> }
>
> public TemplateLinkEx(ServerData data) {
> super(data);
> addPathInfo("nocacheid", new java.util.Date().getTime());
> System.out.println("serverdata");
>
> }
> }
> ---
>
> (System.out.print are added for debugging purpuose only)
>
> but only the 'noargs' version of TemplateLinkEx seems to be called ( when
i
> use $link.setPage("something.vm") ).
> when I use $link.setAction("Somestuff") or
> $link.setPage("something.vm").addPathInfo("id", "123") no one of the three
> version of TemplateLinkEx() seems to be called, but the url looks good
> (i.e. with the right vm page and with '/id/123' at the end of the url).
>
> Any hint? (I'm sure we are pretty near the solution)
>
> Andrea
>
>
> ----- Original Message -----
> From: "Costas Stergiou" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>; "Andrea Papotti"
> <[EMAIL PROTECTED]>
> Sent: Tuesday, August 07, 2001 4:57 PM
> Subject: Re: Browser cache control
>
>
> > Also, you don't modify turbine source, you extend a class (you
> > can set in TR.props the class to use in this case)...
> > ----- Original Message -----
> > From: "Andrea Papotti" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Tuesday, August 07, 2001 5:30 PM
> > Subject: Re: Browser cache control
> >
> >
> > > Is it possible to do the same thing without modifing Turbine surce,
but
> by
> > > using VTL's .addPathInfo() in a Velocimacro ?
> > > (although I don't know how to get current time via VTL)
> > >
> > > Andrea.
> > >
> > > ----- Original Message -----
> > > From: "Costas Stergiou" <[EMAIL PROTECTED]>
> > > To: <[EMAIL PROTECTED]>
> > > Sent: Tuesday, August 07, 2001 10:07 AM
> > > Subject: Re: Browser cache control
> > >
> > >
> > > > Having searched on this issue, I realized that not all browsers
> > > > (or their versions) behave always as expected with these directives.
> > > > What I did to solve a similar problem was to subclass the
> > > > TemplateLink class and add some code to always add a dummy
> > > > path info variable so that the browser thinks that this is a
different
> > > > url. Below is the code.
> > > >
> > > > public class TemplateLinkEx extends TemplateLink {
> > > > public TemplateLinkEx() {
> > > > super();
> > > > }
> > > >
> > > > public TemplateLinkEx(RunData data)
> > > > {
> > > > super(data);
> > > > addPathInfo("nocacheid", new java.util.Date().getTime());
> > > > }
> > > > }
> > > >
> > > > I hope that helps.
> > > > Costas
> > > >
> > > > ----- Original Message -----
> > > > From: "Scott Eade" <[EMAIL PROTECTED]>
> > > > To: <[EMAIL PROTECTED]>
> > > > Sent: Tuesday, August 07, 2001 8:05 AM
> > > > Subject: Browser cache control
> > > >
> > > >
> > > > > Because the data changes all of the time, I need to instruct all
> > > > > browsers that surf to my turbine site to not use their cache nor
> > > > > any other cache that may be sitting in a proxy server between
> > > > > the browser and the web server. To do this I currently have:
> > > > >
> > > > > $page.setHttpEquiv("Cache-Control", "no-cache")
> > > > > $page.setHttpEquiv("Pragma", "no-cache")
> > > > >
> > > > > in my default page layout. This clearly adds:
> > > > >
> > > > > <meta content="no-cache" http-equiv="Cache-Control">
> > > > > <meta content="no-cache" http-equiv="Pragma">
> > > > >
> > > > > to the HTML output, but I am not sure if it is actually setting
> > > > > the HTTP headers - the behaviour I am seeing is that it is
> > > > > not.
> > > > >
> > > > > How can I set the actual HTTP headers so that the content
> > > > > expires immediately? Won't all template driven apps need
> > > > > to expire their content pretty much immediately?
> > > > >
> > > > > Thanks,
> > > > >
> > > > > Scott
> > > > >
> > > > >
> > > > >
> > > >
> > ---------------------------------------------------------------------
> > > > > 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]
> > > >
> > >
> > >
> > > ---------------------------------------------------------------------
> > > 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]