[Simpleweb-Support] How do I cusotmize the port on which my server listens?
Brought to you by:
niallg
From: Dave A. <lar...@ms...> - 2013-04-09 16:38:38
|
Hi, I'm using the latest version of the Simple framework. How do I customize the port on which my server listens? It seems to be 8080 by default, but that port is being used by something else on my system. I'm using the server creation from the example: public class TestContainer implements Container { public void handle(Request request, Response response) { try { final PrintStream body = response.getPrintStream(); long time = System.currentTimeMillis(); response.set("Content-Type", "text/plain"); response.set("Server", "Test/1.0 (Simple 4.0)"); response.setDate("Date", time); response.setDate("Last-Modified", time); body.println("Hello World"); body.close(); } catch(Exception e) { e.printStackTrace(); } } } Thanks, - Dave |