Skip to Main Content

New to Java

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Scraping data from http using cookies

843789Feb 26 2010
I'm trying to scrape some data from http, using URL and URLConnection.

I'm connecting to the site and saving the Set-Cookie string 'ASP.NET_SessionId=xrtmpu55c31ugk45qd2uc2qw; path=/; HttpOnly' (expires at end of session).

When I open the second URLConnection and using urlConn1.setRequestProperty("Cookie", cookie); I dont get the data, I get data like I have no cookie. However it don't send a Set-Cookie (new cookie) from the http server..

Any ideas?

It works fine when I try in a browser..
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 26 2010
Added on Feb 26 2010
0 comments
326 views