I am trying to use a Servlet as a Socket Server which will respond to commands from my Socket Clients when they connect. My problem is that the servlet appears to be creating itself 3 times. The first time works fine, but the second and third time it flips out because the port they are trying to use has already been taken by first instance of the Server. The Server is not responding and I am assuming it is because this has munged it up. My web.XML settings are:
That all makes sense to me (except the part where you decided you wanted to have a servlet act as a SocketServer). The first request creates a SocketServer which listens on port X, and presumably goes into a loop waiting for connections. The second and subsequent requests attempt to create a SocketServer which listens on port X, but of course they can't because something else is already listening on port X. You should not find this surprising.
I'm not sure why your server (you were referring to the SocketServer, not the servlet container, right?) is unresponsive. But that doesn't really matter because a servlet is an extremely poor choice for that task. I would suggest just running an ordinary server application which listens on port X and keep Java EE out of the picture entirely.