I've tried it, and it works. Thanks a lot Matt.

On Tue, Dec 30, 2008 at 8:47 PM, Matt Weaver <[email protected]> wrote:
> Bustanil Arifin wrote:
>> Hi all,
>>
>> I'm using Java on the server side of my application connected by
>> BlazeDS. For authentication purpose, I use Java servlet that stores
>> the username and password to the http session and returns the
>> session's ID.
>> For example, when a user hits this url -
>> http://localhost:8080/myapp/login?username=user&password=secret, the
>> servlet stores the request parameter to the http session and return
>> the session's ID value e.g 123.
>>
>> Next thing I want to do is to tell my Flex application to use the
>> existing session with ID 123, instead of creating a new one. In Java
>> web app I can simply do this using url rewrite by appending
>> jsessionid=123 to the request url. Is there anyway we can do this in
>> Flex?
>>
>> Thanks in advance.
>>
>>
> Experimentally, I've seen that if you put the session id into a cookie
> it will be sent along with any server calls you make from Flex. I'm not
> sure if this is a documented feature, though, or just a side-effect of
> the way the Flash plug in interacts with the browser. If you wanted to
> be safe, you could pass the session id in as a flash var and rewrite the
> destination URL at runtime using something like
> http://www.adobe.com/cfusion/communityengine/index.cfm?event=showdetails&postId=9703&productId=2.
>
> Hope it helps,
> -Matt
> 


-- 
Bustanil Arifin
"Keep moving forward!"

Reply via email to