http://www.hccp.org/java-net-cookie-how-to.html
According to this link I was trying to create cookie and send cookie to enter in a cookie site. But it is not working. Is there is any problem in that. I have some confusion on the method setRequestProperty of URLConnection. I don't understand what are they trying to send by passing "Cookie"? Is it only a string or name or value??
"Cookie"in this case is a way to tell thesetRequestPropertymethod that the argument (which is really just aString) should be treated as a cookie.setRequestPropertymay be more useful for many kinds of properties, butaddRequestPropertywould be more useful for cookies, because you can have multiple cookies per request. The properties are specified in RFC 2068 -- read especially section 14.