i have a hard time understanding how cookies are handle using java. suppose i got a webpage, authenticate.jsp that do this : session.setAttribute("user", "me"); which is actually the authentication key to access other resource of that domain and in other java program i use URLConnection to access this page and save the header like this:
i found out that the cookieValue does not contain the attribute set by authentication.jsp. where is the attribute value actually stored to pass it back so that i can access other resources from that domain
Thanks for replying! as what i had read from your first link, i find that the HttpServletResponse object actually have a getCookies() method to get the cookies set by another webserver. By any chance is there away to get the response from the HttpURlConnection/URLconnection as a HttpServletResponse Object so that i can get the cookie values?