Jules, 

thanks fro your reply.

> Sessions will be tracked with cookies, not url rewriting, by default.

I found this one out too now. 
For debugging, url rewriting is more obvious.


Now I have a simple case (attached):

browser calls the "root-url" http://localhost:8080/session-test
there the welcome-file directive kicks in and uses simple.jsp
this one has only one line:
<jsp:forward page="/loginservlet" />

loginservlet looks at the session, decides if it is old or new
and offers a form that after posting returns to /loginservlet


On Bea WLS 6.1sp2 I see the behaviour, which I think is correct:

the first call to the servlet gets a session isNew() on the session gives
true:

New request:
session is not null, id:
2AqCdn2Gn8UKNSbtNwgxDIJkSO7mFUE3CWxpsQe4UOk5dsbZqzt3!920521618!-1062706052!7
001!7002!1048603266595
isNew() gives: true
encUrl is
loginservlet;jsessionid=2AqCdn2Gn8UKNSbtNwgxDIJkSO7mFUE3CWxpsQe4UOk5dsbZqzt3
!920521618!-1062706052!7001!7002

The next call sees the same session id and as expcected, isNew()==false:

New request:
session is not null, id:
2AqCdn2Gn8UKNSbtNwgxDIJkSO7mFUE3CWxpsQe4UOk5dsbZqzt3!920521618!-1062706052!7
001!7002!1048603266595
isNew() gives: false
encUrl is
loginservlet;jsessionid=2AqCdn2Gn8UKNSbtNwgxDIJkSO7mFUE3CWxpsQe4UOk5dsbZqzt3
!920521618!-1062706052!7001!7002


On JBoss 3.2.0RC4 this looks like this:

First request is ok wrt. isNew()==true

New request:
15:45:43,083 INFO  [STDOUT] session is not null, id:
dbf09fGSqkOGJLjFyKx9WQ**
15:45:43,083 INFO  [STDOUT] isNew() gives: true
15:45:43,083 INFO  [STDOUT] encUrl is
loginservlet;jsessionid=dbf09fGSqkOGJLjFyKx9WQ**
15:46:00,248 INFO  [STDOUT]

Second request to url
http://localhost:8080/session-test/loginservlet;jsessionid=dbf09fGSqkOGJLjFy
Kx9WQ**

(jsessionid is encurl from previous request, so ok.)

New request:
15:46:00,248 INFO  [STDOUT] session is null, creating new session
15:46:00,248 ERROR [SubscribingInterceptor] could not get
AbstractReplicatedStore
15:46:00,248 INFO  [STDOUT] it has id: JHIZDgbRHa9LIzJRGyElBw**
15:46:00,258 INFO  [STDOUT] encUrl is
loginservlet;jsessionid=JHIZDgbRHa9LIzJRGyElBw**


Here the session is null, and thus a new session is created..

What is going wrong?

Find attached an archive with source and .war 



  Heiko

-- 
Bancotec GmbH      EMail: [EMAIL PROTECTED]
Calwer Str. 33     Telefon: +49 711 222 992 900
D-70173 Stuttgart  Telefax: +49 711 222 992 999
Ein Unternehmen der Cellent AG http://www.cellent.de/

Attachment: servlet-session.zip
Description: Binary data

Reply via email to