On 08/06/2011 10:18, Sascha Hesse wrote:
> Hello all,
>=20
> I'm hosting our spring mvc 3.0.5 application in tomcat 7.0.14 and also
> tried 6.0.32
>=20
> The server is hosting two webapps.
>=20
> The frontend: http://localhost:50012/frontend
> The backend: http://localhost:50012/backend
>=20
> The Request-Flow looks as following:
>=20
> User: http://localhost:50012/frontend/index.htm
> AJAX Frontend:
> http://localhost:50012/frontend/setFilter.htm
> AJAX Backend:
> http://localhost:50012/backend/setFilter.htm
> User: onClick()
> AJAX Frontend: http://localhost:50012/frontend/setFilter.htm
> AJAX Backend: http://localhost:50012/backend/setFilter.htm
>=20
>=20
> The corresponding request-pairs to frontend and backend should be
> identified via the sessionID.
>=20
> Tomcat is doing that via Cookie JSESSIONID. I configured Tomcat
> according to https://issues.apache.org/bugzilla/show_bug.cgi?id=3D48379=
> <Context sessionCookiePath=3D"/" sessionCookieDomain=3D".localhost">
>=20
> If I look into the cookies in request and response the following
> happens (note I shortened the sessionIds)
>=20
>=20
> User: http://localhost:50012/frontend/index.htm
> ResponseHeader: -
> RequestHeader: JSESSIONID=3D1
> AJAX Frontend: http://localhost:50012/frontend/setFilter.htm
> ResponseHeader: -
> RequestHeader: JSESSIONID=3D1
> AJAX Backend: http://localhost:50012/backend/setFilter.htm
> ResponseHeader: set JSESSIONID=3D2
> RequestHeader: JSESSIONID=3D1
> User: onClick()
> AJAX Frontend: http://localhost:50012/frontend/setFilter.htm
> ResponseHeader: setJSESSIONID=3D3
> RequestHeader: JSESSIONID=3D2
> AJAX Backend: http://localhost:50012/backend/setFilter.htm
> ResponseHeader: -
> RequestHeader: JSESSIONID=3D2
>=20
> ...the sessionID alsways changes when I'm requesting the other
> context. Has anyone a hint according to this?
Does the AJAX javascript set the session id in a cookie header, or
append it as a path attribute?
You can't rely on the browser to do this automagically for you in most
AJAX libs.
p
|