Patchor for Cacio-web

Mario Torre neugens.limasoftware at gmail.com
Thu Aug 11 13:39:31 PDT 2011


This should make the port to be selectable via a property.

Should, because my environment is a bit kaput, so I didn't test it yet :)

# This patch file was generated by NetBeans IDE
# It uses platform neutral UTF-8 encoding and \n newlines.
--- Base (BASE)
+++ Locally Modified (Based On LOCAL)
@@ -15,9 +15,13 @@
 public class CacioServer {

     public CacioServer() throws Exception {
+        this(8080);
+    }
+
+    public CacioServer(int port) throws Exception {
 	applySystemProperties();
 	
-        Server server = new Server(8080);
+        Server server = new Server(port);

         ServletContextHandler context = new
ServletContextHandler(ServletContextHandler.SESSIONS);
         context.setContextPath("/");
@@ -54,7 +58,9 @@
     }

     public static void main(String[] args) throws Exception {
-	new CacioServer();
+
+        int port = Integer.getInteger("", 8080);
+        new CacioServer(port);
     }

 }


-- 
pgp key: http://subkeys.pgp.net/ PGP Key ID: 80F240CF
Fingerprint: BA39 9666 94EC 8B73 27FA  FC7C 4086 63E3 80F2 40CF

IcedRobot: www.icedrobot.org
Proud GNU Classpath developer: http://www.classpath.org/
Read About us at: http://planet.classpath.org
OpenJDK: http://openjdk.java.net/projects/caciocavallo/

Please, support open standards:
http://endsoftpatents.org/



More information about the caciocavallo-dev mailing list