Page 1 of 1

How can I manage "keep alive" connection?

Posted: Tue Apr 29, 2008 12:54 pm
by ale870
Hello,

I'm new in Revolution Studio (I'm an old user of Asymetrix Toolbook ;-) ).
I just bought this great tool, and this is my first post :-)

I'm making some tests using http (I wish to use Revolution Studio as rich client over an application server java).

I access to the server via Rev using the following code:

Code: Select all

get url ("http://xxxxxxx/ServletExample1/Test1?" & ("username=" & UrlEncode(field "username") ) )
"xxxx" are server name and port.

I noticed that every call creates a new session in the server, and I cannot find any info about the parameter "keep alive", which could be used to "inform" Rev to use the same session instead opening a new one.

Is it correct? Is there any way to let a client talk with a server in a single session?

thank you!

Posted: Tue Apr 29, 2008 10:04 pm
by Janschenkel
You could try setting the 'httpHeaders' to include a line for Keep-Alive.

Code: Select all

on mouseUp
  set the httpHeaders to "Connection: Keep-alive"
  get URL "http://www.example.com/example.jsp?param=example"
end mouseUp
When you set the 'httpHeaders' property, you're adding to/overriding standard HTTP headers that are sent as part of the request.

Hope this helped,

Jan Schenkel.

Posted: Tue Apr 29, 2008 11:40 pm
by ale870
Thank you!
Tomorrow I will try your suggestion!