Re: cache-control
Usha Ladkani <[email protected]> Sun, 14 Aug 2016 09:47:30 +0530
| Newsgroups | gmane.comp.jakarta.jetspeed.user |
|---|---|
| Message-ID | <CAPa2pYvK-1O+6t3X1YZwyLJt53Kirh=jDKdtqWoRLe1rgC3gHw@mail.gmail.com> |
--001a11474b8ce891df053a00649c Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable It worked now :) Thank you so much., Seems to needed to refresh my browser. But I see Mozilla is still caching the session even after below headers. Cache-Controlno-cache, no-store, private, must-revalidate, max-age=3D0 Its working fine on IE. Any idea? On Sun, Aug 14, 2016 at 9:07 AM, Usha Ladkani <[email protected]> wrote= : > > com.sterlingcommerce.neo.ui.dashboard.jetspeed.pages This I added in > TurbineResources.properties . > > I removed it. Now the error is > > Horrible Exception: java.lang.ClassNotFoundException: Requested Page not= found: MyJetspeedJspPage Turbine looked in the following modules.packages = path: [org.apache.jetspeed.modules, org.apache.turbine.modules] > > I have kept class file MyJetspeedJspPage.class under below locations > /dashboard/webapp/WEB-INF/classes/org/apache/jetspeed/modules > > /dashboard/webapp/WEB-INF/org/apache/jetspeed/modules > > Is this location not correct ? > > In order to make it consistent package defined on my class is > package org.apache.jetspeed.modules; > > package org.apache.jetspeed.modules; > > > > On Sun, Aug 14, 2016 at 2:36 AM, DavidSeanTaylor <[email protected]> > wrote: > >> Here is the root of the problem: >> >> Horrible Exception: java.lang.ClassNotFoundException: Requested Page not >> found: MyJetspeedJspPage Turbine looked in the following modules.package= s >> path: [org.apache.jetspeed.modules, org.apache.turbine.modules, >> com.sterlingcommerce.neo.ui.dashboard.jetspeed] * at >> >> Appears you have not placed MyJetspeedJspPage in the correct directory >> relative to your module root above >> For example I think your MyJetspeedJspPage class needs to go under the >> package: >> >> com.sterlingcommerce.neo.ui.dashboard.jetspeed.pages >> >> I guess you can also put it here, but its not following recommended >> Turbine best practices: >> >> org.apache.jetspeed.modules.pages >> >> >> >> > On Aug 13, 2016, at 12:54 PM, Usha Ladkani <[email protected]> >> wrote: >> > >> > Yes in services in my TemplateService.default.extension property , >> > TurbineResources.properties is set to .jsp. >> > >> > Now I am seeing this exception, >> > >> > Error encountered processing a template: >> > /layouts/html/default.jspjava.lang.NullPointerException at >> > com.sterlingcommerce.dash.jsp.WEB_002dINF.templates.jsp.layo >> uts.html.default_jsp._jspService(default_jsp.java:75) >> > at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97) >> at >> > javax.servlet.http.HttpServlet.service(HttpServlet.java:806) at >> > org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511) >> at >> > org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:40= 1) >> at >> > org.mortbay.jetty.security.SecurityHandler.handle(SecurityHa >> ndler.java:216) >> > at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandl >> er.java:182) >> > at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandl >> er.java:768) >> > at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:45= 0) >> at >> > org.mortbay.jetty.servlet.Dispatcher.include(Dispatcher.java:193) at >> > org.apache.turbine.services.jsp.TurbineJspService.handleRequ >> est(TurbineJspService.java:202) >> > at >> > org.apache.jetspeed.modules.layouts.JetspeedJspLayout.doBuil >> d(JetspeedJspLayout.java:130) >> > at org.apache.turbine.modules.Layout.build(Layout.java:91) at >> > org.apache.turbine.modules.LayoutLoader.exec(LayoutLoader.java:123) at >> > org.apache.turbine.modules.pages.DefaultPage.doBuild(Default >> Page.java:169) >> > at org.apache.turbine.modules.Page.build(Page.java:90) at >> > org.apache.turbine.modules.PageLoader.exec(PageLoader.java:123) at >> > org.apache.turbine.Turbine.handleException(Turbine.java:712) at >> > org.apache.turbine.Turbine.doGet(Turbine.java:634) at >> > javax.servlet.http.HttpServlet.service(HttpServlet.java:693) at >> > javax.servlet.http.HttpServlet.service(HttpServlet.java:806) at >> > org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511) >> at >> > org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:40= 1) >> at >> > org.mortbay.jetty.security.SecurityHandler.handle(SecurityHa >> ndler.java:216) >> > at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandl >> er.java:182) >> > at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandl >> er.java:768) >> > at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:45= 0) >> at >> > org.mortbay.jetty.servlet.Dispatcher.forward(Dispatcher.java:329) at >> > org.mortbay.jetty.servlet.Dispatcher.forward(Dispatcher.java:126) at >> > org.apache.jasper.runtime.PageContextImpl.doForward(PageCont >> extImpl.java:703) >> > at >> > org.apache.jasper.runtime.PageContextImpl.forward(PageContex >> tImpl.java:670) >> > at com.sterlingcommerce.dash.jsp.index_jsp._jspService(index_js >> p.java:85) >> > at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97) >> at >> > javax.servlet.http.HttpServlet.service(HttpServlet.java:806) at >> > org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511) >> at >> > org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:40= 1) >> at >> > org.mortbay.jetty.security.SecurityHandler.handle(SecurityHa >> ndler.java:216) >> > at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandl >> er.java:182) >> > at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandl >> er.java:768) >> > at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:45= 0) >> at >> > org.mortbay.jetty.servlet.Dispatcher.forward(Dispatcher.java:329) at >> > org.mortbay.jetty.servlet.Dispatcher.forward(Dispatcher.java:126) at >> > org.mortbay.jetty.servlet.DefaultServlet.doGet(DefaultServlet.java:503= ) >> at >> > javax.servlet.http.HttpServlet.service(HttpServlet.java:693) at >> > javax.servlet.http.HttpServlet.service(HttpServlet.java:806) at >> > org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511) >> at >> > org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilte >> r(ServletHandler.java:1221) >> > at >> > com.sterlingcommerce.woodstock.ui.dlsso.DLSSOFilter. >> doFilter(DLSSOFilter.java:259) >> > at >> > org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilte >> r(ServletHandler.java:1212) >> > at >> > com.sterlingcommerce.woodstock.ui.SecurityExtensionFilter.do >> Filter(SecurityExtensionFilter.java:173) >> > at >> > org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilte >> r(ServletHandler.java:1212) >> > at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandl >> er.java:399) >> > at >> > org.mortbay.jetty.security.SecurityHandler.handle(SecurityHa >> ndler.java:216) >> > at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandl >> er.java:182) >> > at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandl >> er.java:768) >> > at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:45= 0) >> at >> > org.mortbay.jetty.handler.ContextHandlerCollection.handle(Co >> ntextHandlerCollection.java:230) >> > at >> > org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCo >> llection.java:114) >> > at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapp >> er.java:152) >> > at org.mortbay.jetty.Server.handle(Server.java:326) at >> > org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:544= ) >> at >> > org.mortbay.jetty.HttpConnection$RequestHandler.headerComple >> te(HttpConnection.java:942) >> > at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:549) at >> > org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212) at >> > org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:406) at >> > org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEn >> dPoint.java:410) >> > at >> > org.mortbay.thread.BoundedThreadPool$PoolThread.run( >> BoundedThreadPool.java:451)* >> > Horrible Exception: java.lang.ClassNotFoundException: Requested Page >> not >> > found: MyJetspeedJspPage Turbine looked in the following >> modules.packages >> > path: [org.apache.jetspeed.modules, org.apache.turbine.modules, >> > com.sterlingcommerce.neo.ui.dashboard.jetspeed] * at >> > org.apache.turbine.modules.PageLoader.getInstance(PageLoader.java:175) >> at >> > org.apache.turbine.modules.PageLoader.exec(PageLoader.java:123) at >> > >> > >> > >> > >> > I have kept my classes MyJetspeedJspPage.class and MyVelocityPage.clas= s >> in >> > directory /WEB-INF/classes/org/apache/jetspeed/modules. >> > >> > >> > On Sat, Aug 13, 2016 at 9:57 PM, DavidSeanTaylor <[email protected]= m >> > >> > wrote: >> > >> >> Did you add your class to the modules path in >> TurbineResources.properties? >> >> >> >> module.packages=3Dorg.apache.jetspeed.modules >> >> module.packages=3Dorg.apache.turbine.modules >> >> >> >>> Do I need to extend JetspeedJspPage also? this is also mentioned in >> the >> >>> TurbineResources.properties >> >>> as below >> >>> >> >>> services.JspService.default.page =3D JetspeedJspPage11 >> >> >> >> Perhaps. Look in TurbineResources.properties, maybe this is set to >> .jsp? >> >> By default it is vm: >> >> >> >> services.TemplateService.default.extension=3Dvm >> >> >> >> >> >>> On Aug 13, 2016, at 8:09 AM, Usha Ladkani <[email protected]> >> wrote: >> >>> >> >>> 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 =3D 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 h= as >> >> 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=E2=80=99ll have = to >> override >> >>>> JetspeedVelocityPage in TurbineResources.properties with your own >> >>>> implementation. >> >>>> >> >>>> See TurbineResources.properties >> >>>> services.VelocityService.default.page =3D 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=3D" + >> >>>> 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 doBuildBeforeActio= n >> to >> >>>> include your required headers, don=E2=80=99t call super.doBuildBefo= reAction, >> and >> >>>> then plug your handler into TurbineResources.properties >> >>>> >> >>>> services.VelocityService.default.page =3D 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 =3D Do not set cache related headers (Jetspeed 1.3a1 behavio= r) >> >>>>> # 0 =3D set the following http headers >> >>>>> # Cache-Control =3D "no-cache" >> >>>>> # Last-Modified =3D (current time) >> >>>>> # Pragma =3D "no-cache" >> >>>>> # Expires =3D "0" >> >>>>> # n where n is the number of seconds: >> >>>>> # Cache-Control =3D "max-age: n" where n is the number o= f >> >> seconds >> >>>>> # Last-Modified =3D (current time) >> >>>>> # Expires =3D (current time + n seconds) >> >>>>> http.lifetime=3D1 >> >>>>> >> >>>>> >> >>>>> ######################################### >> >>>>> >> >>>>> >> >>>>> 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 >> >>>> >> >>>> >> >> >> >> >> >> --------------------------------------------------------------------- >> >> To unsubscribe, e-mail: [email protected] >> >> For additional commands, e-mail: [email protected]= g >> >> >> >> >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [email protected] >> For additional commands, e-mail: [email protected] >> >> > --001a11474b8ce891df053a00649c--