Move the server class into its own static class.
Use double locking to ensure only one instance of the server.
Server in of itself needs to extend thread to do this.
This should look like ShittyWebServer server = ShittyWebServer.getInstance(PORT,CONTEXTROOT,.etc); server.start();
Move the server class into its own static class. Use double locking to ensure only one instance of the server. Server in of itself needs to extend thread to do this.
ShittyWebServer server = ShittyWebServer.getInstance(PORT,CONTEXTROOT,.etc); server.start();