If you're building a wicket-only application, typically you would
create your own session class (extends WebSession) and add normal
properties to that class just as you would do with a normal object.
This provides a better way of dealing with session usage from a
programmers point of view: no more guessing what the session attribute
was, just invoke the MySession.get().getUser()
For instance, the wicket-auth-role examples project shows how to
create such a session class.
Martijn
On 6/22/06, JFC <[EMAIL PROTECTED]> wrote:
>
>
>
> Hey:
>
>
> I've found a way to solve this problem:
>
> -------------------------------
> javax.servlet.http.HttpServletRequest httpRequest =
> ((ServletWebRequest)
> RequestCycle.get().getRequest()).getHttpServletRequest();
>
> HttpSession sessionStore = httpRequest.getSession();
>
> System.out.print ( "UserID: " + sessionStore.getAttribute("userid"));
> System.out.print ( "sessionid: " +
> sessionStore.getAttribute("sessionid"));
> -----------------------------------------
> Is this safe?
>
> <P.s> I don't know why my subject "How to get Attribute in HttpSession in
> wicketApplication" can't be replied by using the button on the
> page
> http://www.mail-archive.com/[email protected]/msg15266.html,
> could anyone please tell me did I make
> any mistake? (I send to the email:
> [email protected]) , thx very much!
>
> JFC Hsieh
> All the advantages of Linux Managed Hosting--Without the Cost and Risk!
> Fully trained technicians. The highest number of Red Hat certifications in
> the hosting industry. Fanatical Support. Click to learn more
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&dat=121642
>
> _______________________________________________
> Wicket-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>
>
>
--
Download Wicket 1.2 now! Write Ajax applications without touching JavaScript!
-- http://wicketframework.org
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&dat=121642
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user