The browser will send only those cookies that were set by this server with every request to the server. So, a cookie with name "username" set by javaranch will be sent to javaranch and a cookie with name "username" set by yahoo.com, will be sent to yahoo.com. A particular site can only retrieve the cookies that it set.
Cookie.setPath() method
The cookie.setPath(String uri) method sets the return path to where the cookie should come back along with the request from the browser.
If we do not set the return path, does the cookie comes back to the same server path?
If you do not call the setPath method on a cookie, the browser returns the cookie only to URLs in or below the directory containing the page that sent the cookie.
0 Comments:
Post a Comment
<< Home