----- Original Message -----
From: "Santiago Gala" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, May 21, 2001 6:53 PM
Subject: Re: Session variables sometimes lost


> Also, I think
sessions are host-specific, so if you have some links like
"localhost/..." and others like "127.0.0.1/..." you will get TWO
sessions, one for each prefix.

The links that have session problems are all based on the following root:

/jetspeed/portal/screen/<myScreen>

> If the browser has cookies enabled, they are used. If not, the url
rewriting method is used.

Well, cookies are enabled, but we often see encoded URLs, ending with
"sessionid=<xxxxx>"

> BUT, for every internal link, you should call
the encodeURL() or encodeRedirectURL() methods on HttpServletResponse to
ensure that every url is rewritten.

The links are created via the "HREF" tag, and directly inserted into the ECS
concreteElement object that is returned by the "doBuild" method of the
Screen class.
I never used the HttpServletResponse object, since it seemed to me that in
Jetspeed the ECS objects were made to send the response to the client.

>The reasons of losing sessions could be:
- session timeout due to lack of activity (I think we have 30 minutes
default)

i don't think so, because we sometimes had the problem just after the
connection was made, and the other portal elements worked fine, with the
session elements correctly retrieved.
I should have told you that these session problems we have do not impact the
whole Jetspeed portal, it only happens in the latest portlet (and its
associated screens) i have developed.
But i don't understand why because:
- the code i use is the same than the one is the other portlets and screens
i have developped (rundata.getSession().getParameter())
-  it works fine 99% on the development platform, but it fails almost
everytime on the production platform.

>- using different hostnames for different pages

we don't.

>- forgetting to call the encodeURL() stuff and the user does not accept
cookies

Maybe that, but since we return ECS objetcs instead of using
HttpServletResponse, how can we use this encodeURL() method ?

St�phane


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to