I think using the httpsession in this case is an acceptable solution.

Maurice

On Tue, Apr 15, 2008 at 3:10 AM, mfs <[EMAIL PROTECTED]> wrote:
>
>  Guys,
>
>  Please comment..
>
>  I have a non-wicket AuthenticationFilter which is intercepting all request
>  to my wicket-app and checking if the request is coming in from a valid user.
>  Basically in the url am passed over an authenticationToken (by another
>  application where the user has signed in already). Now in my
>  AuthenticationFilter i check if that is a valid token and if yes i want to
>  set some attribute (isAuthenticated etc) in wicket-session, .
>
>  The problem is that the wicket session has yet not been created (because
>  this is the first request to the wicket app, intercepted by the filter), and
>  hence i get this error "you can only locate or create sessions in the
>  context of a request cycle", when i try do a Session.get().
>
>  I am already using WicketSessionFilter which would expose my wicket session
>  to my non-wicket filter. The problem is just for the first request, where a
>  wicket session yet doesnt exist.
>
>  I am thinking of using HttpSession directly in my filter and store all the
>  session data there, but before i do so, i thought to check if anyone has a
>  better work around, ideally i would want to avoid using it.
>
>  Thanks in advance
>
>  Farhan
>  --
>  View this message in context: 
> http://www.nabble.com/Can-only-locate-or-create-session-in-the-context-of-a-request-cycle.-tp16693084p16693084.html
>  Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: [EMAIL PROTECTED]
>  For additional commands, e-mail: [EMAIL PROTECTED]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to