0

I have an GWT-RPC service with two methods, test and login.

I call the methods in this order, printing out the session information each time:

login()

Session Information:
ID: odl0h9578zww
isNew: true

test()

Session Information:
ID: lqv4leczh3ke
isNew: true

As can be seen here, both calls have a different session ID.

On the client side in the onSuccess for each of these calls I print out the value of the JSESSIONID cookie:

login(), JESSIONID cookie found, value is od10h9578zww
test(), JESSIONID cookie found, value is lqv4leczh3ke

If I hit refresh, I get the following (which is what I expected the first time):

login()

Session Information:
ID: mgn1uvuzdwx3
isNew: false

test()

Session Information:
ID: mgn1uvuzdwx3
isNew: false

Can anyone explain why, before a refresh, each call gets a new session ID?

3
  • You might want to inspect the HTTP response and request headers to see if a cookie is actually set, which is necessary for most session handling systems.
    – Gipsy King
    Nov 4, 2010 at 9:07
  • I had each call's onSuccess print the value of the JSESSIONID cookie."login(), JSESSION cookie found, value is 1jwufooxmt8w4", "test(), JSESSION cookie found, value is 1rrjupbo719fa"
    – hudsonb
    Nov 4, 2010 at 16:19
  • @hudsonb have you solved this problem?
    – czajah
    Feb 21, 2012 at 13:34

1 Answer 1

0

Set the expiration time of session.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.