Anyone know if suns webserver could possibly redirect socket connection from a client to a different machine?

What im trying to say is if i set-up a socket to a host with a running webserver.

Could the server possibly redirect the info sent over the socket. Then the server could save that info close the current socket, open a new one which could send the same info to another machine with an ip outside the network?

The client machine which connects to the webserver would be on the same network as the server possibly using a vpn.

Could a servlet solve this problem? Or a serverside app the listens for info coming thru then redirects that to the outside machine using a socket also.