Thank you so much.
I tried this , but it did not work.

Do I need to extend JetspeedJspPage also?  this is also mentioned in the
TurbineResources.properties
  as below

services.JspService.default.page = JetspeedJspPage11


On Fri, Aug 12, 2016 at 8:25 PM, DavidSeanTaylor <[email protected]>
wrote:

> Looks like you are using some release of Jetspeed-1. That project has been
> retired since 2008.
>
> https://portals.apache.org/jetspeed-1/ <https://portals.apache.org/
> jetspeed-1/>
>
>
> Seems the cache header logic is hard-coded, so you’ll have to override
> JetspeedVelocityPage in TurbineResources.properties with your own
> implementation.
>
> See TurbineResources.properties
> services.VelocityService.default.page = JetspeedVelocityPage
> Then see JetspeedVelocityPage, it calls super.doBuildBeforeAction, which
> contains the hard-coding in JetspeedTemplatePage.java:
>
> switch (httpLifetime)
> {
>     case -1:
>         break;
>     case 0:
>         data.getResponse().setHeader("Cache-Control", "no-cache");
>         data.getResponse().setHeader("Pragma", "no-cache");
>         data.getResponse().setDateHeader("Expires", 0);
>         data.getResponse().setDateHeader("Last-Modified",
> System.currentTimeMillis());
>         break;
>     default:
>         data.getResponse().setHeader("Cache-Control", "max-age=" +
> httpLifetime);
>         data.getResponse().setDateHeader("Expires",
> System.currentTimeMillis() + (httpLifetime * 1000));
>         data.getResponse().setDateHeader("Last-Modified",
> System.currentTimeMillis());
>         break;
> }
>
> To override this behavior, simply write your own velocity page handler
> extending JetspeedVelocityPage, and override the doBuildBeforeAction to
> include your required headers, don’t call super.doBuildBeforeAction, and
> then plug your handler into TurbineResources.properties
>
> services.VelocityService.default.page = MyVelocityPage
>
>
> > On Aug 11, 2016, at 10:06 PM, Usha Ladkani <[email protected]>
> wrote:
> >
> > It says - JetspeedResources.properties,v 1.1.1326.2 2012/05/31 21:38:56
> >
> > In this property I see below
> >
> > #########################################
> > # HTTP Page header                      #
> > #########################################
> > # http.lifetime is the lifetime of the page as set in the
> > # HTTP Headers
> > #  -1 = Do not set cache related headers (Jetspeed 1.3a1 behavior)
> > #   0 = set the following http headers
> > #           Cache-Control = "no-cache"
> > #           Last-Modified = (current time)
> > #           Pragma        = "no-cache"
> > #           Expires       = "0"
> > #   n where n is the number of seconds:
> > #           Cache-Control = "max-age: n" where n is the number of seconds
> > #           Last-Modified = (current time)
> > #           Expires       = (current time + n seconds)
> > http.lifetime=1
> >
> >
> > #########################################
> >
> >
> > Looks like this only can set Cache-Control to no-cache or max-age.:
> >
> > Can you please tell me which version are you using and share your
> > JetspeedResources.properties
>
>

Reply via email to