On 2/17/06, Riyad Kalla <[EMAIL PROTECTED]> wrote: > I have setup a listener to place Hibernate Session instances into each > HttpSession created and clean them out when done. Although now in my > WebPage code I need to get access to the HttpSession in order to pull > the Hibernate Session out and am not seeing a good way to do it. All the > add/remove/getAttribute methods in addition to the ISessionStore > instance are all protected, and AFAIKT those are the ways to get to the > underlying HttpSession.
If you really need the HttpSession, ISessionStore is not even guaranteed to be backed by that. Which is one reason why I removed the getHttpSession method from Session. Another is that I saw some serious mis-use in on of the wicket-stuff projects, giving me a stronger idea that it was 'too easy to get' still. Anyway, you can always get it like this: ((WebRequest)getRequest()).getHttpServletRequest().getSession() > > Any help appreciated. > > > I'd like to appologize for the onslaught of n00b questions recently, > believe it or not I actually search for this stuff before I ask... but > my guess is not good enough. Hey, no problem! That's what the user list is for :) Eelco ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://sel.as-us.falkag.net/sel?cmd=lnk&kid3432&bid#0486&dat1642 _______________________________________________ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user