Posting to multiple servlets on same session using HttpUrlConnection

S

SPG

Hi,

I am trying to build a simple load test tool that makes a set of scripted
posts to some of my servlets in my web app.
All I want to do is open a connection, post some data to one servlet, wait
for response then post to s second.
The problem is that I need to use the same session.

Does anyone know a way to do this?

Steve
 
B

Ben_

You'll need to send back the cookies you received in the response. But
HttpUrlConnection doesn't do this transparently. Apache HTTPClient has
built-in support for cookies.

But, I'd suggest you have a look at existing web stress tools (JMeter, for
example), because, although you begin with simple things, it can rapidly
become complex and you'll spend quite of a time developping.
 

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

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,818
Latest member
Brigette36

Latest Threads

Top