weird response about java serverSocket
<p>I wrote a simple java Server programming which just accept a connection and print "Sending response" into screen. When I use safari to connect this server, the server print the result one time, which is a correct result. However, when I reload the page, there will be three "Sending response" to print into the screen. Could anyone can help me?</p>

<pre><code>public class Server {
    public void runServer() throws Exception{
     ServerSocket socketServer = new ServerSocket(3721);
    System.out.println("Listerning for connections on port:"+socketServer.getLocalPort());
    while(true){
        Socket socket = socketServer.accept();
        System.err.println("Established with:"+socket);
        String request = parseRequest(socket);
        String response = createResponse(request);
        sendResponse(response);
        socket.close();
    }
    }

public String parseRequest(Socket socket){
    return "request";
}

public String createResponse(String request){
    return "response";
}

public void sendResponse(String response){
    System.out.println("Sending response");
}

public static void main(String[] args) throws Exception{
    Server server = new Server();
    server.runServer();
}
}
</code></pre>

<p>The outputs are:</p>

<pre><code>Listerning for connections on port:3721
Sending response
Established with:Socket[addr=/0:0:0:0:0:0:0:1%0,port=59055,localport=3721]
Sending response
Established with:Socket[addr=/0:0:0:0:0:0:0:1%0,port=59065,localport=3721]
Established with:Socket[addr=/0:0:0:0:0:0:0:1%0,port=59066,localport=3721]
Sending response
Sending response
Established with:Socket[addr=/0:0:0:0:0:0:0:1%0,port=59067,localport=3721]
</code></pre>
