Get full URL path from browser with using ServerSocket and Socket classes
<p>I'm trying write my individual HTTP Server and I need a help .<br />
What is the method of ServerSocket or Socket class can to invoke on the URL and brining it into a code.</p>

<p>For example, if I write following link <code>&lt;b&gt;http://localhost:8080/coupon/add?name=coupon name&lt;/b&gt;</code> in browser, I would be want to get this link into my code.</p>

<p>Maybe who know how can I do this?</p>

<p>my simple code:</p>

<pre><code>import java.io.IOException;

import java.net.ServerSocket;
import java.net.Socket;


public class HTTPServer {

    public static void main(String[] args) {

        new HTTPServer().startServer();
    }

    public void startServer() {
        try (ServerSocket serverSocket = new ServerSocket(8080)) {

            System.out.println("Server is started");
            while (true) {
                Socket socket = serverSocket.accept();

            }

        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
</code></pre>

<p>Thanks</p>