I worked through this example provided online: http://www.mkyong.com/java/how-to-automate-login-a-website-java-example/ and successfully programmatically logged into my gmail. this tutorial's method was to send a get request of the sign-in page, send a post request to submit the login information, and then send another get request to see the gmail page. the session is maintained throughout.
however, when i tried to programmatically log into amazon (via get, post, then get again to a profile-specific page), the session is not maintained. after sending the post request, i send a get request to the shopping cart page in hopes of getting my profile's shopping cart. i am redirected to the sign in page instead.
i've read online that in order to maintain the session, cookies need to be sent to the next get request. i did pretty much the exact same thing as instructed in the tutorial, except for amazon, and it does not work though.
can anyone explain why the session is not being maintained for amazon, but is for gmail?
thanks in advance!