Re: Using the HttpSession object with openamf
"Bruce Raggett" <[email protected]>
| Newsgroups | gmane.comp.java.openamf.user |
|---|---|
| Message-ID | <000001c5aca0$0120aa70$31b43bcb@phicorp> |
Hello Oliver, Thank you very much for replying. I have written a servlet filter which (1) Retrieves a user object from the HttpSession object before a request is handled and (2) Stores the user object in a ThreadLocal object and (3) Retrieves the user object from the ThreadLocal object after the request has been handled and (4) Stores the user object in the HttpSession object and my tests indicate that the filter is working as expected. However every time the Flash application connects to Tomcat and openamf, it is assigned a diffferent session (I am logging the session ids assigned). Is there something else that I have to do to associate the Flash application with a session so that each call to Tomcat and openamf is associated with the same session? Looking forward to your reply. Many thanks, Bruce. ----- Original Message ----- From: "Oliver Lietz" <[email protected]> To: <[email protected]> Cc: "Bruce Raggett" <[email protected]> Sent: Sunday, August 28, 2005 9:14 PM Subject: Re: [Openamf-user] Using the HttpSession object with openamf > Am Sonntag, 28. August 2005 14:18 schrieb Bruce Raggett: >> Hello All, >> >> I am developing a small Flash application and am having trouble trying to >> determine how to use the HttpSession object with openamf. >> >> On the first call to the server I want to create an HttpSession object >> and >> store user data from the application's database in the HttpSession >> object. >> >> Then in subsequent calls to the server I want to check that the >> HttpSession >> object is still valid and retrieve the data I cached in the HttpSession >> object on my first call to the server. >> >> However I am unable to determine how to do this, as I cannot find any >> method that I can call from a plain Java object that will return me the >> HttpSession object. >> >> Any help will be appreciated. > > Hello Bruce, > > look at "Acegi Security System for Spring" [1] chapter "1.4. Request > Contexts" > and the HttpSessionContextIntegrationFilter. I'm using Spring with Acegi > successfully in my own application for authentication and authorization. > You have to build the latest version 0.9.0 from source (CVS). > > good luck, > Oliver > > [1] http://acegisecurity.sourceforge.net/ > > > > > -- > No virus found in this incoming message. > Checked by AVG Anti-Virus. > Version: 7.0.344 / Virus Database: 267.10.16/83 - Release Date: 26/08/2005 > ------------------------------------------------------- SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf