Changeset dc3e4bf33aeac15eae214d81b1b2b03995b845ce

Show
Ignore:
Timestamp:
08/02/10 20:25:10 (4 years ago)
Author:
Theo Schlossnagle <jesus@omniti.com>
git-committer:
Theo Schlossnagle <jesus@omniti.com> 1280780710 +0000
git-parent:

[68099ffb2814a0fc46c7b3adf85d2ea148208923]

git-author:
Theo Schlossnagle <jesus@omniti.com> 1280780710 +0000
Message:

make jezebel bind only to localhost

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • src/java/com/omniti/jezebel/Jezebel.java

    r9d8cd38 rdc3e4bf  
    55import org.mortbay.jetty.Request; 
    66import org.mortbay.jetty.Server; 
     7import org.mortbay.jetty.bio.SocketConnector; 
    78import org.mortbay.jetty.servlet.Context; 
    89import org.mortbay.jetty.servlet.ServletHolder; 
     
    2324    String port; 
    2425    Server server; 
     26    SocketConnector connector; 
    2527    CommandLine cmd = null; 
    2628    CommandLineParser parser = new PosixParser(); 
     
    4042    port = cmd.getOptionValue("p"); 
    4143    if(port == null) port = "8083"; 
    42     server = new Server(new Integer(port)); 
     44    connector = new SocketConnector(); 
     45    connector.setPort(new Integer(port)); 
     46    connector.setHost("127.0.0.1"); 
     47    server = new Server(); 
     48    server.addConnector(connector); 
    4349    Context root = new Context(server, "/", Context.SESSIONS); 
    4450    root.addServlet(new ServletHolder(new JezebelResmon()), "/resmon");