tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <>
Subject Re: webapps and TCP/UDP listening sockets
Date Fri, 01 Jul 2011 18:34:26 GMT
Hash: SHA1


On 7/1/2011 10:52 AM, Tim Judd wrote:
> I understand you guys are trying to help, but I am disappointed all I'm hearing 
> is "you're doing it wrong" basically.

You're reading it wrong: I was asking "what are you doing?" not telling
you that you are doing it wrong.

> I was hoping a quick answer to know which 
> machine is executing the code which would be the same side that has it bound.

The machine where you launch the program is the machine that executes
the code. That's pretty universal, you just need to understand the code
you're talking about.

In your Citrix example, you run the Citrix client on (let's say) your
home computer, and that code continues to run there pretty much for all
time (until you terminate the program). If that program runs /another/
program remotely and displays the contents, then the remote program has
always been remote and you are just being allowed to interact with it at
a distance.

> Does anyone know which machine will bind?

If you are running a webapp, the servlet container will always bind on
the server and a traditional webapp never binds to anything at all: the
container (Tomcat in this case) handles everything.

If you write a program to call-up a web server and request information,
your client program will bind to whatever machine it runs on (your home
computer perhaps) and the two programs exchange information over the wire.

You can't run a program on one machine that binds to a port on another
machine, at least without some super-special black magic going on.

If you write a web application that creates it's own sockets (which is
what we're saying doesn't make any sense to do, but it's hard to tell
what on earth you're talking about in the first place), they will bind
on the server, never the client.

Does that clear anything up?

- -chris
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla -


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message