You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@lenya.apache.org by Wolfgang Jeltsch <wo...@jeltsch.net> on 2006/08/31 01:31:52 UTC

jsessionid

Hello,

are there any possibilities to get rid of these ugly jsessionid arguments in 
the URIs?  I dont't want to have session ids in page URIs since they disturb 
the URIs.  They lead to people bookmarking URIs which belong to a specific 
session of themselves, and sending such URIs to friends.  And they are 
generally not clear and easy to remember. What I want are URIs like 
http://www.me.org/introcuction/curriculum-vitae/.

Best wishes,
Wolfgang

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


Re: jsessionid

Posted by Wolfgang Jeltsch <wo...@jeltsch.net>.
Am Donnerstag, 31. August 2006 09:00 schrieb Josias Thöny:
> […]

> The jsessionid is always appended to the first URL when a session
> starts. At the same time, a jsessionid cookie is sent to the browser. If
> the browser accepts the cookie and sends it back with the next request,
> the server doesn't use the jsessionid request parameter anymore.
> However, if the browser does not accept session cookies, the server will
> continue to append the jsessionid to all URLs, in order to maintain the
> user session. (Not sure if the second option actually works with lenya)

Okay, thanks for this information.  Maybe I can live with that.

> AFAIK you get this behaviour with all servlet applications.
> I don't know if it can be changed, you could take a look at the servlet
> specification.

It wouldn't be nice if it couldn't be changed since such a basic framework 
like the servlet framework shouldn't force specific URL conventions upon you 
in my opinion.

> In general it should not be a problem to bookmark a URL including a
> jsessionid, or sending it as a link to somebody.

It is a problem because the people don't get the real, nice URL but 
a “disturbed” one.  It's ugly.

> The jsessionid will be discarded and a new session will be created. You
> don't have to remember the jsessionid parameter, the URL should work without
> it.

At least it works this way.

However, I wonder why you need to identify sessions anyway.  Most websites 
just don't need this in my opinion.

> […]

Best wishes,
Wolfgang

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


Re: jsessionid

Posted by Josias Thöny <jo...@wyona.com>.
On Thu, 2006-08-31 at 01:37 +0200, Wolfgang Jeltsch wrote:
> Am Donnerstag, 31. August 2006 01:31 schrieb Wolfgang Jeltsch:
> > Hello,
> >
> > are there any possibilities to get rid of these ugly jsessionid arguments
> > in the URIs?  I dont't want to have session ids in page URIs since they
> > disturb the URIs.  They lead to people bookmarking URIs which belong to a
> > specific session of themselves, and sending such URIs to friends.  And they
> > are generally not clear and easy to remember. What I want are URIs like
> > http://www.me.org/introcuction/curriculum-vitae/.
> >
> > Best wishes,
> > Wolfgang
> 
> Hmm, I just discovered that these jsessionid arguments are not always 
> generated but I cannot see when they are and when they are not.  It even 
> looks as if they are sometimes generated and sometimes not if you use the 
> same URI of the form http://host:port/publication/live/.  Could someone tell 
> me what the corresponding rule is? Thanks.

The jsessionid is always appended to the first URL when a session
starts. At the same time, a jsessionid cookie is sent to the browser. If
the browser accepts the cookie and sends it back with the next request,
the server doesn't use the jsessionid request parameter anymore.
However, if the browser does not accept session cookies, the server will
continue to append the jsessionid to all URLs, in order to maintain the
user session. (Not sure if the second option actually works with lenya)

AFAIK you get this behaviour with all servlet applications.
I don't know if it can be changed, you could take a look at the servlet
specification. 

In general it should not be a problem to bookmark a URL including a
jsessionid, or sending it as a link to somebody. The jsessionid will be
discarded and a new session will be created. You don't have to remember
the jsessionid parameter, the URL should work without it.

hth,
josias

> 
> Best wishes,
> Wolfgang
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
> For additional commands, e-mail: user-help@lenya.apache.org
> 
> 


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


Re: jsessionid

Posted by Wolfgang Jeltsch <wo...@jeltsch.net>.
Am Donnerstag, 31. August 2006 01:31 schrieb Wolfgang Jeltsch:
> Hello,
>
> are there any possibilities to get rid of these ugly jsessionid arguments
> in the URIs?  I dont't want to have session ids in page URIs since they
> disturb the URIs.  They lead to people bookmarking URIs which belong to a
> specific session of themselves, and sending such URIs to friends.  And they
> are generally not clear and easy to remember. What I want are URIs like
> http://www.me.org/introcuction/curriculum-vitae/.
>
> Best wishes,
> Wolfgang

Hmm, I just discovered that these jsessionid arguments are not always 
generated but I cannot see when they are and when they are not.  It even 
looks as if they are sometimes generated and sometimes not if you use the 
same URI of the form http://host:port/publication/live/.  Could someone tell 
me what the corresponding rule is? Thanks.

Best wishes,
Wolfgang

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