This content has been marked as final.
Show 3 replies
-
1. Re: How to initialize (session) seam context ("No active session context" problem)?
shane.bryzak Aug 15, 2008 1:10 PM (in response to vlax)I'm assuming you have access to the HttpServletRequest object - if so, you can create a session context manually and retrieve the Identity instance from it directly:
Context ctx = new SessionContext( new ServletRequestSessionMap(httpServletRequest) ); Identity identity = (Identity) ctx.get(Identity.class);
-
2. Re: How to initialize (session) seam context ("No active session context" problem)?
shane.bryzak Aug 15, 2008 1:13 PM (in response to vlax)Actually, that probably won't be enough to perform full authentication. I recommend that you wrap your Seam-specific code in a ContextualHttpRequest, that way you'll get full access to all Seam contexts (and be able to authenticate).
-
3. Re: How to initialize (session) seam context ("No active session context" problem)?
vlax Aug 22, 2008 2:25 PM (in response to vlax)Thanks Shane! It works now (well, most of it :)). I hope that Seam API docs will reach the same level of quality as the Seam framework itself.