aspose file tools
The moose likes Sockets and Internet Protocols and the fly likes why i can't get cookie from a special web site? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Reply Bookmark "why i can Watch "why i can New topic
Author

why i can't get cookie from a special web site?

jieyun liu
Greenhorn

Joined: Oct 08, 2008
Posts: 4



My question is: How can I get the cookie from the web site:http://www.csdn.net?
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

"hea ton", please check your private messages.


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
jieyun liu
Greenhorn

Joined: Oct 08, 2008
Posts: 4
Originally posted by Paul Sturrock:
"hea ton", please check your private messages.


i have changed my name, is that right?
Pat Farrell
Rancher

Joined: Aug 11, 2007
Posts: 4422
    
    2

Originally posted by hea ton:
My question is: How can I get the cookie from the web site: http://www.csdn.net?[/b][/QB]


Cookie security rules say that only two places can get to a cookie.

1) the user can get them from his browser
2) a site can get those created for their domain

So the answer is to be on www.csdn.net and get them there
jieyun liu
Greenhorn

Joined: Oct 08, 2008
Posts: 4
hi, Pat. First, Thanks for your help.
But I am still in trouble.
I know where I shoule get the cookie from, But i don't know how.

you refer to the cookie security rules, can you give me some urls of books or references?
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 35258
    
    7
What do you mean by "the cookie"? That page doesn't set any cookies. It includes various elements that do so (images, iframes etc.) though; if you want to access the cookies set by those, then you'll need to load those elements in addition to the main page.


Android appsImageJ pluginsJava web charts
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12271
    
    1
Cookie rules are contained in RFC2965 - a google search will lead you straight to a copy of this standard.
Bill
jieyun liu
Greenhorn

Joined: Oct 08, 2008
Posts: 4
Originally posted by William Brogden:
Cookie rules are contained in RFC2965 - a google search will lead you straight to a copy of this standard.
Bill


One Month ago, I have read the reference.
But I can not find the answer.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 35258
    
    7
But I can not find the answer.

If the question is still the original one -how to get a cookie from that page- then I would have thought that my post answers that ... not so?
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12271
    
    1
How did the the cookie from "http://www.csdn.net" get set in the first place?

In what interaction did csdn.net get a request and send a response HTTP header setting a cookie?

What received the response containing the cookie?

Bill
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: why i can't get cookie from a special web site?
 
Similar Threads
Set cookie for given site
Web service using HttpURLConnection
Invoking webservice- Server returned HTTP response code: 500
Unable to access tomcat protected resource using Cookie manager for JSessionID
Problems connecting to LDAP from Weblogic Server: BAD_CERTIFICATE error!