Rupp,Heiko wrote:

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

you've declared your webapp as distributed and ignored the message that Jetty gave you on startup about not being able to provide distributed session management (probably becaise you are running 'default' not 'all' - this one is also in the FAQ, I believe).

Your session manager is broken. When you fix the errors that you are getting during deployment it will work properly.

No doubt you are using xdoclet to produce your web.xml - unfortunately it defaults to declaring all webapps distributable. You will need to set distributable="false" in your build.xml

Jules


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






________________________________________________________________________ This email has been scanned for all viruses by the MessageLabs SkyScan service. For more information on a proactive anti-virus service working around the clock, around the globe, visit http://www.messagelabs.com ________________________________________________________________________


------------------------------------------------------- This SF.net email is sponsored by: The Definitive IT and Networking Event. Be There! NetWorld+Interop Las Vegas 2003 -- Register today! http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en _______________________________________________ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to