Hi kevin,
You don't need to add the filter; you already have it there in your
web.xml. I was just showing the format of the init param.
The quickstart example app was running for me, so you could double check
your configuration against that?
Dan

Sorry to be brief, sent from my phone
On Nov 27, 2011 9:19 AM, "Kevin Meyer - KMZ" <[email protected]> wrote:

> Hmm.. Unless there is something awful with my caching, no - it doesn't
> work for me.
>
> I added the <filter> below to my web.xml. The whole thing is (without
> the outer <web-app...>:
>
> The Saip* servlet stuff is so that I can customise the "Welcome" page.
>
>
>    <display-name>Apache Isis HTML Viewer</display-name>
>
>    <listener>
>
>  
> <listener-class>org.apache.isis.runtimes.dflt.webapp.IsisWebAppBootstrapper</listener-class>
>    </listener>
>
>    <context-param>
>        <param-name>isis.viewers</param-name>
>        <param-value>html</param-value>
>    </context-param>
>
>        <filter>
>                <filter-name>IsisSessionFilter</filter-name>
>
>  
> <filter-class>org.apache.isis.runtimes.dflt.webapp.IsisSessionFilter</filter-class>
>                <init-param>
>                        <param-name>logonPage</param-name>
>                        <param-value>/logon.app</param-value>
>                </init-param>
>        </filter>
>
>        <filter>
>                <filter-name>StaticContentFilter</filter-name>
>
>  
> <filter-class>org.apache.isis.core.webapp.content.ResourceCachingFilter</filter-class>
>                <init-param>
>                        <param-name>CacheTime</param-name>
>                        <param-value>86400</param-value>
>                </init-param>
>        </filter>
>
>    <filter>
>        <filter-name>IsisSessionFilterForHtml</filter-name>
>
>  
> <filter-class>org.apache.isis.runtimes.dflt.webapp.IsisSessionFilter</filter-class>
>        <init-param>
>            <param-name>logonPage</param-name>
>            <param-value>/logon.htmlviewer</param-value>
>        </init-param>
>        <init-param>
>            <param-name>cacheAuthSessionOnHttpSession</param-name>
>            <param-value>true</param-value>
>        </init-param>
>    </filter>
>
>        <filter-mapping>
>                <filter-name>StaticContentFilter</filter-name>
>                <url-pattern>*.css</url-pattern>
>        </filter-mapping>
>        <filter-mapping>
>                <filter-name>StaticContentFilter</filter-name>
>                <url-pattern>*.png</url-pattern>
>        </filter-mapping>
>        <filter-mapping>
>                <filter-name>StaticContentFilter</filter-name>
>                <url-pattern>*.jpg</url-pattern>
>        </filter-mapping>
>        <filter-mapping>
>                <filter-name>StaticContentFilter</filter-name>
>                <url-pattern>*.gif</url-pattern>
>        </filter-mapping>
>
>    <filter-mapping>
>        <filter-name>IsisSessionFilter</filter-name>
>        <url-pattern>*.app</url-pattern>
>    </filter-mapping>
>
>    <servlet>
>        <servlet-name>Logon</servlet-name>
>        <!--
> <servlet-class>viewer.saip.html.servlet.SaipLogonServlet</servlet-class> -->
>
>  
> <servlet-class>org.apache.isis.viewer.html.servlet.LogonServlet</servlet-class>
>
>    </servlet>
>
>    <servlet>
>        <servlet-name>Controller</servlet-name>
>        <!--
> <servlet-class>viewer.saip.html.servlet.SaipControllerServlet</servlet-class>
> -->
>
>  
> <servlet-class>org.apache.isis.viewer.html.servlet.ControllerServlet</servlet-class>
>    </servlet>
>
>    <servlet>
>        <servlet-name>Resource</servlet-name>
>
>  
> <servlet-class>org.apache.isis.core.webapp.content.ResourceServlet</servlet-class>
>    </servlet>
>
>    <servlet>
>        <servlet-name>Forward</servlet-name>
>
>  
> <servlet-class>org.apache.isis.core.webapp.routing.ForwardingServlet</servlet-class>
>        <init-param>
>            <param-name>forwardTo</param-name>
>            <param-value>logon.app</param-value>
>        </init-param>
>    </servlet>
>
>    <servlet-mapping>
>        <servlet-name>Logon</servlet-name>
>        <url-pattern>/logon.app</url-pattern>
>    </servlet-mapping>
>
>    <servlet-mapping>
>        <servlet-name>Controller</servlet-name>
>        <url-pattern>*.app</url-pattern>
>    </servlet-mapping>
>
>    <servlet-mapping>
>        <servlet-name>Resource</servlet-name>
>                <url-pattern>*.css</url-pattern>
>    </servlet-mapping>
>    <servlet-mapping>
>        <servlet-name>Resource</servlet-name>
>                <url-pattern>*.png</url-pattern>
>    </servlet-mapping>
>    <servlet-mapping>
>        <servlet-name>Resource</servlet-name>
>                <url-pattern>*.jpg</url-pattern>
>    </servlet-mapping>
>    <servlet-mapping>
>        <servlet-name>Resource</servlet-name>
>                <url-pattern>*.gif</url-pattern>
>    </servlet-mapping>
>    <servlet-mapping>
>        <servlet-name>Forward</servlet-name>
>        <url-pattern>/</url-pattern>
>    </servlet-mapping>
>
>
>
>
> On 27 Nov 2011 at 7:51, Dan Haywood wrote:
>
> > OK, could you do an update (specifically of runtimes/dflt), and see if
> that
> > works?
> >
> > The chance is that the IsisSessionFilter now takes an
> > 'cacheAuthSessionOnHttpSession'.
> >
> >     <filter>
> >         <filter-name>IsisSessionFilterForHtml</filter-name>
> >
> >
> <filter-class>org.apache.isis.runtimes.dflt.webapp.IsisSessionFilter</filter-class>
> >         <init-param>
> >             <param-name>logonPage</param-name>
> >             <param-value>/logon.htmlviewer</param-value>
> >         </init-param>
> >         <init-param>
> >             <param-name>cacheAuthSessionOnHttpSession</param-name>
> >             <param-value>true</param-value>
> >         </init-param>
> >     </filter>
> >
> > The original behaviour was that caching always happens, however for the
> > json viewer I wanted to disable this (because REST is stateless and so
> will
> > require that credentials are required to be passed with each request).
> >
> > The regression was that I made had caching switched off if the
> > "cacheAuthSessionAuthOnHttpSession" init-param is missing (which of
> course
> > it would have been for your existing web.xml).  I've now changed it so
> that
> > the default is it is switched on by default.
> >
> > Let me know if it still doesn't work.
> > Dan
> >
> >
> > On 27 November 2011 07:41, Dan Haywood <[email protected]>
> wrote:
> >
> > > Yup, I've broken it.  Sorry about that.  Looking into it now.
> > > Dan
> > >
> > >
> > > On 27 November 2011 07:34, Kevin Meyer - KMZ <[email protected]> wrote:
> > >
> > >> Dan,
> > >>
> > >> Since your recent changes, I can't login to the HTML viewer - I get a
> > >> web browser error, essentially about infinite redirects (logon.app ->
> > >> start.app -> logon.app -> ....)
> > >>
> > >> Can you verify that it works for you?
> > >>
> > >> Regards,
> > >> Kevin
> > >>
> > >>
> > >
> >
>
>
> --
> Kevin Meyer, PhD, Pr.Sci.Nat
> KMZ             P.O. Box 9822, Sharon Park, South Africa.
> Tel: +27 11 363 2001   Cell: +27 83 346 3045
>
>
>

Reply via email to