Hi,
I've got a problem that I have no idea how to fix. I'm using
IAuthorizationStrategy to authenticate the users of my application.
However on the first request to the server (WebRequest)getRequestCycle()
returns null all the time, so I therefore cannot get an cookies (which I
want). This is a real pain.
Why is it the case that its null here, but later in the flow its there?
Stack trace of nullpointer exception:
Root cause:
java.lang.NullPointerException
at mypackage.context.DefaultSession.isAuthenticated(DefaultSession.java:69)
at
mypackage.security.IntranetAuthorizationStrategy.isInstantiationAuthorized(IntranetAuthorizationStrategy.java:33)
at org.apache.wicket.Application$1.onInstantiation(Application.java:276)
at
org.apache.wicket.Application.notifyComponentInstantiationListeners(Application.java:974)
at org.apache.wicket.Component.<init>(Component.java:874)
at org.apache.wicket.MarkupContainer.<init>(MarkupContainer.java:105)
at org.apache.wicket.Page.<init>(Page.java:236)
at org.apache.wicket.markup.html.WebPage.<init>(WebPage.java:184)
at
org.apache.wicket.security.components.SecureWebPage.<init>(SecureWebPage.java:48)
etc..
DefaultSession.java:69 is:
Cookie cookie = ((WebRequest)getRequestCycle()).getCookie("user");
Any ideas?
thanks
Wayne