Hi,
in my application
- the user opens a page for the first time (and some objects are stored in the web session)
- this page (in a custom tag) makes a request to a servlet
I would like that the servlet could see the same web session of the calling code so I use cookies:
...
URLConnection conn = url.openConnection();
String cookie;
...
conn.setRequestProperty("Cookie", cookie);
where cookie is something like "JSESSIONID=43527628366".
This works fine in Tomcat but doesn't work with Websphere 5 :-(
I can see only two options:
- my code is not standard
- Websphere bug ????
Can anybody help me to find a solution which work for both web containers?
Thank you very much in advance!!
Andrea
-
cookie management in Tomcat and Websphere (3 messages)
- Posted by: Andrea Giovannini
- Posted on: March 11 2003 11:33 EST
Threaded Messages (3)
- Noticed a problem before!!! by srini sam on March 12 2003 21:26 EST
- Try this... by srini sam on March 12 2003 21:33 EST
- Try this... by Andrea Giovannini on March 14 2003 04:06 EST
- Try this... by srini sam on March 12 2003 21:33 EST
-
Noticed a problem before!!![ Go to top ]
- Posted by: srini sam
- Posted on: March 12 2003 21:26 EST
- in response to Andrea Giovannini
Just as an FYI: When using WAS 3.5 a couple of years ago, we noticed the problem you mention here. We decided to use URL rewriting instead.
http://www-3.ibm.com/software/webservers/appserv/doc/v40/ae/infocenter/was/0404010101.html
Thanks.
--Srini -
Try this...[ Go to top ]
- Posted by: srini sam
- Posted on: March 12 2003 21:33 EST
- in response to srini sam
http://forum.java.sun.com/thread.jsp?thread=82797&forum=46&message=214364
Note the syntax: ("Cookie", "sesessionid=4553cx987e2")
sesessionid?? May be that's the secret... -
Try this...[ Go to top ]
- Posted by: Andrea Giovannini
- Posted on: March 14 2003 04:06 EST
- in response to srini sam
Hi,
I followed your hint but that doesn't work with WAS 5.0 ....
It seems that WAS has a custom cookie management.
Still looking for the solution (possibly different from changing application server :-))
Does anybody know some good resources (other tips'n tricks like the one mentioned in srinivasan's post) ??
Thanks,
Andrea