Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Tomcat/JSP - multiple concurrent connections from same client

Thread Tools

Tomcat/JSP - multiple concurrent connections from same client

Posts: n/a

I was attempting to do some testing of some thread based code, so had
a JSP with a deliberate delay loop inside it so that I could lock
something for a period of time, when I noticed the following.

I opened three webrowsers (IE) on my Windows XP box and pointed each
in turn at the following JSP page (being served directly by Tomcat
v4.1.27 on port 8080 on a Linux box):

<%@ page import="my.log.package.*" %>
int waitfor = 0;
String timer = request.getParameter("wait");
if (timer != null) waitfor = (new Integer(timer)).intValue();"jsp", "I'm here and waiting: " +

<title>Thread Test</title>

<p>Just a simple thread test.</p>

if (waitfor > 0){
for (int i = 0; i < waitfor * 1000000; ) { i = i + 1; }
}"jsp", "... finished " + request.getParameter("id"));



So the browsers were pointed at:


If I start the first two off so that they're both waiting for the loop
to finish before getting their pages, and then set the third going, it
blocks until one of the others returns and then comes through.

The logs (my custom log) confirms this.

I've tried it on another XP machine as well.

So I then did the same test, but with the first two URL's accessed on
one machine, and the third accessed from another concurrently, and all
behaved as you might expect - ie. the third received the page

Anyone any ideas what's going on? Is there some kind of
connection-per-machine thing that I don't know about?

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Pix 501 and Concurrent VPN Connections Cisco 3 01-29-2006 10:29 PM
problems locating the concurrent EDU.oswego.cs.dl.util.concurrent package Pep Java 6 08-16-2005 07:26 AM
Re: [Twisted-Python] Limiting number of concurrent client connections Jp Calderone Python 0 06-28-2005 02:10 PM
PIX 501, concurrent connections. gooofoofs Cisco 1 04-14-2005 08:07 AM
concurrent connections =?Utf-8?B?c3RlcGhlbg==?= ASP .Net 9 05-03-2004 02:36 AM