You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@avalon.apache.org by le...@apache.org on 2003/01/08 08:13:04 UTC

cvs commit: jakarta-avalon-apps/sevak/src/java/org/apache/avalon/apps/sevak/blocks/jetty JettySevak.java

leif        2003/01/07 23:13:03

  Modified:    sevak/src/java/org/apache/avalon/apps/sevak/blocks/jetty
                        JettySevak.java
  Log:
  Make it possible to configure Jetty to ignore the host and respond to all virtual
  hosts in requests.
  
  Revision  Changes    Path
  1.9       +7 -3      jakarta-avalon-apps/sevak/src/java/org/apache/avalon/apps/sevak/blocks/jetty/JettySevak.java
  
  Index: JettySevak.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-apps/sevak/src/java/org/apache/avalon/apps/sevak/blocks/jetty/JettySevak.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- JettySevak.java	1 Dec 2002 23:57:24 -0000	1.8
  +++ JettySevak.java	8 Jan 2003 07:13:02 -0000	1.9
  @@ -48,7 +48,10 @@
   {
   
       private Server m_server;
  +    
  +    /** Virtual host to bind the context to.  null implies all hosts are in context. */
       private String m_hostName;
  +    
       private HashMap m_webapps = new HashMap();
       private int m_port;
       private File m_sarRootDir;
  @@ -78,7 +81,7 @@
        */
       public void configure(final Configuration configuration) throws ConfigurationException
       {
  -        m_hostName = configuration.getChild("hostname").getValue("localhost");
  +        m_hostName = configuration.getChild("hostname").getValue( null );
           m_port = configuration.getChild("port").getValueAsInteger(8080);
       }
   
  @@ -151,8 +154,9 @@
               ctx.setContextPath(context);
               m_server.addContext(m_hostName,ctx);
   
  -            System.out.println("deploying context=" + context + ", webapp=" + webAppURL + " to host="
  -                    + m_hostName);
  +            System.out.println("deploying context=" + context + ", webapp=" + webAppURL
  +                + " to host=" + ( m_hostName == null ? "(All Hosts)" : m_hostName ) );
  +                
               ctx.setExtractWAR(true);
               m_webapps.put(context, ctx);
               ctx.start();
  
  
  

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>