You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@isis.apache.org by Kevin Meyer - KMZ <ke...@kmz.co.za> on 2011/11/27 08:34:10 UTC
Can't login to HTML viewer
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
Re: Can't login to HTML viewer
Posted by Kevin Meyer - KMZ <ke...@kmz.co.za>.
Got it, thanks.
It works now.
Regards,
Kevin
On 27 Nov 2011 at 17:56, Dan Haywood wrote:
> Hi Kevin,
> ok, you were right, it wasn't fixed (and the html viewer in the quickstart
> app was broken also, dunno why I thought it was not).
>
> Please do an update and try once more.
>
> Dan
Re: Can't login to HTML viewer
Posted by Dan Haywood <da...@haywood-associates.co.uk>.
Hi Kevin,
ok, you were right, it wasn't fixed (and the html viewer in the quickstart
app was broken also, dunno why I thought it was not).
Please do an update and try once more.
Dan
On 27 November 2011 10:10, Dan Haywood <da...@haywood-associates.co.uk> wrote:
> I'll look at it later when I'm back I'm my office. Sorry it's caused you a
> bit of grief this morning.
> Later, Dan
>
> Sorry to be brief, sent from my phone
> On Nov 27, 2011 10:06 AM, "Kevin Meyer - KMZ" <ke...@kmz.co.za> wrote:
>
>> Ok - by abandoning ".app" suffix, replacing all references to such in my
>> code with htmlViewerContext.getSuffix() or
>> getHtmlViewerContext().getSuffix(), I can now login and use the HTML
>> viewer with the .htmlviewer suffix.
>>
>> .app still doesn't doesn't work, though. Login with valid credentials
>> returns to login page.
>>
>> On 27 Nov 2011 at 11:39, Kevin Meyer - KMZ wrote:
>>
>> > An update.
>> >
>> > By leaving out the .htmlviewer related stuff, when I login with correct
>> > details, I am now immediately forwarded back to the login.app page.
>> >
>> > If I change all .app to .htmlviewer, I can login, but once logged in the
>> > service menu links still point to *.app resources, which don't work.
>> >
>> > Ongoing...
>> >
>> >
>> >
>> > 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?
>>
>>
Re: Can't login to HTML viewer
Posted by Dan Haywood <da...@haywood-associates.co.uk>.
I'll look at it later when I'm back I'm my office. Sorry it's caused you a
bit of grief this morning.
Later, Dan
Sorry to be brief, sent from my phone
On Nov 27, 2011 10:06 AM, "Kevin Meyer - KMZ" <ke...@kmz.co.za> wrote:
> Ok - by abandoning ".app" suffix, replacing all references to such in my
> code with htmlViewerContext.getSuffix() or
> getHtmlViewerContext().getSuffix(), I can now login and use the HTML
> viewer with the .htmlviewer suffix.
>
> .app still doesn't doesn't work, though. Login with valid credentials
> returns to login page.
>
> On 27 Nov 2011 at 11:39, Kevin Meyer - KMZ wrote:
>
> > An update.
> >
> > By leaving out the .htmlviewer related stuff, when I login with correct
> > details, I am now immediately forwarded back to the login.app page.
> >
> > If I change all .app to .htmlviewer, I can login, but once logged in the
> > service menu links still point to *.app resources, which don't work.
> >
> > Ongoing...
> >
> >
> >
> > 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?
>
>
Re: Can't login to HTML viewer
Posted by Kevin Meyer - KMZ <ke...@kmz.co.za>.
Ok - by abandoning ".app" suffix, replacing all references to such in my
code with htmlViewerContext.getSuffix() or
getHtmlViewerContext().getSuffix(), I can now login and use the HTML
viewer with the .htmlviewer suffix.
.app still doesn't doesn't work, though. Login with valid credentials
returns to login page.
On 27 Nov 2011 at 11:39, Kevin Meyer - KMZ wrote:
> An update.
>
> By leaving out the .htmlviewer related stuff, when I login with correct
> details, I am now immediately forwarded back to the login.app page.
>
> If I change all .app to .htmlviewer, I can login, but once logged in the
> service menu links still point to *.app resources, which don't work.
>
> Ongoing...
>
>
>
> 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?
Re: Can't login to HTML viewer
Posted by Dan Haywood <da...@haywood-associates.co.uk>.
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" <ke...@kmz.co.za> 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 <da...@haywood-associates.co.uk>
> wrote:
> >
> > > Yup, I've broken it. Sorry about that. Looking into it now.
> > > Dan
> > >
> > >
> > > On 27 November 2011 07:34, Kevin Meyer - KMZ <ke...@kmz.co.za> 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
>
>
>
Re: Can't login to HTML viewer
Posted by Kevin Meyer - KMZ <ke...@kmz.co.za>.
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 <da...@haywood-associates.co.uk> wrote:
>
> > Yup, I've broken it. Sorry about that. Looking into it now.
> > Dan
> >
> >
> > On 27 November 2011 07:34, Kevin Meyer - KMZ <ke...@kmz.co.za> 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
Re: Can't login to HTML viewer
Posted by Kevin Meyer - KMZ <ke...@kmz.co.za>.
An update.
By leaving out the .htmlviewer related stuff, when I login with correct
details, I am now immediately forwarded back to the login.app page.
If I change all .app to .htmlviewer, I can login, but once logged in the
service menu links still point to *.app resources, which don't work.
Ongoing...
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?
>
Re: Can't login to HTML viewer
Posted by Dan Haywood <da...@haywood-associates.co.uk>.
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 <da...@haywood-associates.co.uk> wrote:
> Yup, I've broken it. Sorry about that. Looking into it now.
> Dan
>
>
> On 27 November 2011 07:34, Kevin Meyer - KMZ <ke...@kmz.co.za> 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
>>
>>
>
Re: Can't login to HTML viewer
Posted by Dan Haywood <da...@haywood-associates.co.uk>.
Yup, I've broken it. Sorry about that. Looking into it now.
Dan
On 27 November 2011 07:34, Kevin Meyer - KMZ <ke...@kmz.co.za> 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
>
>