Java Browser and URL Connection

M

Msj121

Hi,
Curious question:
Assuming I open an HTTPUrlConnection to a website with a "Keep
Alive" session, is it possible when i use ...getDesktop().browse(....)
-- will the httpurlconnection that i am posting to be "received" (get)
by the browser. My main question is whether its the same session?

Should I only read from the data stream then? The problem with this
is that I am uploading a "file" to this website (using
httpurlConnection) and it will be displayed in a small applet (I am
trying to use maps.google.com to be specific). I can post some code
(especially when im done), but at the moment its sadly some guess and
check based on past get/post (never tried anything like this so I do
appreciate the help -- which may be because its impossible (what im
starting to think)).
 
A

Andrew Thompson

Msj121 wrote:
...
Assuming I open an HTTPUrlConnection to a website with a "Keep
Alive" session, is it possible when i use ...getDesktop().browse(....)

That is a big assumption, given the only method in
Desktop that has a browse function, accepts an URI.
 
R

Roedy Green

Assuming I open an HTTPUrlConnection to a website with a "Keep
Alive" session, is it possible when i use ...getDesktop().browse(....)
-- will the httpurlconnection that i am posting to be "received" (get)
by the browser. My main question is whether its the same session?

You could well get a second copy of the browser running.

Each HTTP GET/PUT is logically a single session. Under the covers,
sometimes a session gets recycled, but logically it is a new session.

I suppose you could do some experiments looking an underlying socket
numbers, but I would be surprised if is the scenario you described, if
a TCP/IP session were recycled.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top