File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Sockets and Internet Protocols and the fly likes Cookies Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Bookmark "Cookies" Watch "Cookies" New topic


Jukka Nevalainen

Joined: Dec 14, 2009
Posts: 9
Hi there

I'm programming kinda Socket Connection to access a website's user-only sites. Therefore I access the site for the first time and get the cookie called 'PHPSESSID'. I remember it and use it for the upcoming connections, but this doesn't work. Therefore I checked the cookies that are transmitted on other call of the website (with HTTP Live Headers - firefox plugin). There was a big amount of data and I copied it and tried it with it. Than it worked
My Request looked like that:

So, does anyone of you know where I could get all these params? because they aren't listed if I access the website for the first time.

Or.. is there even a mechanism in java to handle cookies?

Thank you very much for the help!

Joe Ess

Joined: Oct 29, 2001
Posts: 9191

Apache HttpClient handles cookies.

[How To Ask Questions On JavaRanch]
Jukka Nevalainen

Joined: Dec 14, 2009
Posts: 9
Thank you for your reply! I guess my problem is solved
I agree. Here's the link:
subject: Cookies
It's not a secret anymore!