Problem on retaining or reusing a http session with the socket
Hi
I have a problem on retaining or reusing a http session with the socket,
first let me clarify myself, the basic concept in my mind is each time when you initiate a connection to a web server there will be a http session associate with it, this session keep trace with the client conversation, is that right?(please correct me if I'm wrong)
with that concept I develop a socket program, the program initiate a http connection with the web server, and send a http GET request (suppose that it get a html file page1.html), the server accept it and response the html code of page1.html, that fine I have no problem with that, now I like to get another page (let said page2.html), so I send another GET request to the web server, but this time the program throw a "java.net.SocketException: Connection closed by remote host" exception.
although the problem could be solve by initiate another connection to get the page2, but the thing is if I do that, then there will be 2 different sessions for each connection instead of same one.
I wonder is there any way to keeping one sessions with multiple time GET or POST request in java socket programming.
if no how can the borwser do that
Any help wil be great appreciate.

