You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Arjun Dhar <dh...@yahoo.com> on 2012/02/13 14:04:04 UTC

Get the Wicket Session from HttpServletSession

Hi,
Am writing an Authentication Filter for Ajax Requests (that may or may not
originate from Wicket), and I have access to the Raw "HttpSession" but I
need access to my principal object thats part of my "WebSession".

I dont understand why "WebSession" is not a derivative of the native session
and while from Wicket, one can access the raw session or request, the other
way round doesn't seem part of officially charted waters.

..as part of the unofficial hacking guide, I realized
"wicket:wicket.wicketapp:session" holds the Wicket Session Object. Now, is
this key defined anywhere? Can I reply on using this string or is there a
more elegant way of getting the Wicket Session from a Native Session?!

tx

-----
Software documentation is like sex: when it is good, it is very, very good; and when it is bad, it is still better than nothing!
--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Get-the-Wicket-Session-from-HttpServletSession-tp4383677p4383677.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


RE: Get the Wicket Session from HttpServletSession

Posted by Wilhelmsen Tor Iver <To...@arrive.no>.
> What about the part that would solve my problem -- wicket:wicket.wicketapp:session , do I just use that or there is some higher order function available :)

WebApplication. getSessionAttributePrefix(WebRequest, String) seems to set it, but afterwards it's harder to get at: But once set you can get it using null values for the parameters.

- Tor Iver


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


RE: Get the Wicket Session from HttpServletSession

Posted by Arjun Dhar <dh...@yahoo.com>.
What about the part that would solve my problem --
wicket:wicket.wicketapp:session , do I just use that or there is some higher
order function available :)

-----
Software documentation is like sex: when it is good, it is very, very good; and when it is bad, it is still better than nothing!
--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Get-the-Wicket-Session-from-HttpServletSession-tp4383677p4383731.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


RE: Get the Wicket Session from HttpServletSession

Posted by Wilhelmsen Tor Iver <To...@arrive.no>.
> I dont understand why "WebSession" is not a derivative of the native session and while from Wicket, one can access the raw session or request, the other way round doesn't seem part of officially charted waters.

Because a Wicket session can be stored elsewhere if you want. Storing it in the Http session is just the default.

- Tor Iver

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org