File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes Cookies.... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Cookies...." Watch "Cookies...." New topic


Frank Tollenaar

Joined: Dec 18, 2006
Posts: 18
I have a big problem with sending back cookies to the server.
I have put them when the servlet send them in a string. Each cookies separated by a semi-colon. This worked fine.
The problem is when I want to send back the cookies it seems it doesn't take it.
To send them back i do the following :
URL newURL = new (http://something);
objURLConnection = newURL.openConnection();
objURLConnection.setRequestProperty("cookie", myCookieString);
When I check the cookies, I have a new session. It didn't take my old one.
Can anyone give me a clue on what is happening?
Thanks in advance
Frank Tollenaar

Joined: Dec 18, 2006
Posts: 18
Forget my post, I found a solution.
Andy Page

Joined: Jul 29, 2002
Posts: 21
Please can u post the code. I am working on similar thing.
I agree. Here's the link:
subject: Cookies....
It's not a secret anymore!