struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Bollmeyer <j...@christianbollmeyer.de>
Subject Re: How can i get struts JSessionId from the the url
Date Thu, 22 Jan 2004 19:22:50 GMT
Am Donnerstag, 22. Januar 2004 16:49 schrieb Vinay Kumar Munikuntla:
> Hi
>
> How can i get struts JSessionId from the the url.. ?

What exactly do you want - if it is only retrieving
the session id, use session.getId(). Some useful
methods to check where the session info came
from are

request.isRequestedSessionIdFromCookie();
request.isRequestedSessionIdFromURL();
request.isRequestedSessionIdValid();

If you want to get rid of the ;jsessionid=
thing, you have exactly two choices:

1. Don't use sessions and kill existing ones.
2. Enforce Cookies if the client (search
engine spiders do not) supports them.
You can use the above methods to tell
what method was used, and if it's not
the cookie version, branch to an error
page telling the user to enable cookies
first.

> Vinay Kumar Munikuntla

HTH,
-- Chris.


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Mime
View raw message