I got some sample code from the net here: http://www.javadb.com/sending-a-post-request-with-parameters-from-a-java-class
That works fine. It sets the relevant headers in the response. However, what if I wanted to visit another url on the same site with those headers? If I create another URL object the session is lost. How do I maintain the session?