tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject cvs commit: jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/connector SaveConnectorAction.java
Date Wed, 10 Dec 2003 23:05:05 GMT
markt       2003/12/10 15:05:05

  Modified:    webapps/admin/WEB-INF/classes/org/apache/webapp/admin/connector
                        SaveConnectorAction.java
  Log:
  - Fix bug 24771: Unable to create new connector
  
  Revision  Changes    Path
  1.12      +11 -12    jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/connector/SaveConnectorAction.java
  
  Index: SaveConnectorAction.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/connector/SaveConnectorAction.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- SaveConnectorAction.java	16 May 2002 20:05:50 -0000	1.11
  +++ SaveConnectorAction.java	10 Dec 2003 23:05:05 -0000	1.12
  @@ -62,17 +62,11 @@
   package org.apache.webapp.admin.connector;
   
   import java.net.URLEncoder;
  -import java.util.Iterator;
   import java.util.Locale;
   import java.io.IOException;
   import javax.management.Attribute;
   import javax.management.MBeanServer;
  -import javax.management.MBeanServerFactory;
  -import javax.management.QueryExp;
  -import javax.management.Query;
  -import javax.management.ObjectInstance;
   import javax.management.ObjectName;
  -import javax.management.JMException;
   import javax.servlet.ServletException;
   import javax.servlet.http.HttpServletRequest;
   import javax.servlet.http.HttpServletResponse;
  @@ -177,11 +171,16 @@
      
                   String serviceName = cform.getServiceName();
                   
  +                String address = cform.getAddress();
  +                if (address.compareTo("") == 0) {
  +                    address = null;
  +                }
  +                
                   ObjectName oname =
                       new ObjectName(TomcatTreeBuilder.CONNECTOR_TYPE +
                                      ",service=" + serviceName +
                                      ",port=" + cform.getPortText() +
  -                                   ",address=" + cform.getAddress());
  +                                   ",address=" + address);
                                                   
                   // Ensure that the requested connector name is unique
                   if (mBServer.isRegistered(oname)) {
  @@ -200,7 +199,7 @@
                   values = new Object[3];                
                   values[0] = // parent 
                       TomcatTreeBuilder.SERVICE_TYPE + ",name=" + serviceName;
  -                values[1] = cform.getAddress();
  +                values[1] = address;
                   values[2] = new Integer(cform.getPortText());
   
                   if ("HTTP".equalsIgnoreCase(connectorType)) {
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Mime
View raw message