geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pmcma...@apache.org
Subject svn commit: r562021 [1/4] - in /geronimo/server/branches/2.0: applications/console/geronimo-console-framework/src/main/webapp/js/ applications/console/geronimo-console-standard/src/main/java/org/apache/geronimo/console/ applications/console/geronimo-co...
Date Thu, 02 Aug 2007 05:51:21 GMT
Author: pmcmahan
Date: Wed Aug  1 22:51:18 2007
New Revision: 562021

URL: http://svn.apache.org/viewvc?view=rev&rev=562021
Log:
GERONIMO-3350 merge web connector improvements from trunk to 2.0.  used this perl script

$trunk = "https://svn.apache.org/repos/asf/geronimo/server/trunk";
@revs = ("559530", "559536", "559541", "559643", "559657", "559697", "559901", "560010", "560317", "560392", "560394", "561027", "561104", "561149", "561324", "561370", "561375", "561400", "561409", "561418", "561455", "561610", "561629", "561661", "561983");
foreach $rev (@revs) {
    system ("svn -r " . ($rev-1) . ":$rev merge $trunk .");
}



Added:
    geronimo/server/branches/2.0/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/webmanager/connector/editConnector.jsp   (contents, props changed)
      - copied, changed from r561149, geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/webmanager/connector/editConnector.jsp
    geronimo/server/branches/2.0/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/
      - copied from r559530, geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/
    geronimo/server/branches/2.0/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/AJP13ConnectorGBean.java
      - copied, changed from r559530, geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/AJP13ConnectorGBean.java
    geronimo/server/branches/2.0/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/AbstractHttp11ConnectorGBean.java
      - copied, changed from r560394, geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/AbstractHttp11ConnectorGBean.java
    geronimo/server/branches/2.0/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/Ajp13Protocol.java
      - copied, changed from r559530, geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/Ajp13Protocol.java
    geronimo/server/branches/2.0/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/BaseHttp11ConnectorGBean.java
      - copied, changed from r559530, geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/BaseHttp11ConnectorGBean.java
    geronimo/server/branches/2.0/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/BaseHttp11Protocol.java
      - copied, changed from r559530, geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/BaseHttp11Protocol.java
    geronimo/server/branches/2.0/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/CommonProtocol.java
      - copied, changed from r559530, geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/CommonProtocol.java
    geronimo/server/branches/2.0/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/ConnectorGBean.java
      - copied, changed from r559530, geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/ConnectorGBean.java
    geronimo/server/branches/2.0/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/Http11APRConnectorGBean.java
      - copied, changed from r560392, geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/Http11APRConnectorGBean.java
    geronimo/server/branches/2.0/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/Http11APRProtocol.java
      - copied unchanged from r560392, geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/Http11APRProtocol.java
    geronimo/server/branches/2.0/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/Http11ConnectorGBean.java
      - copied, changed from r559530, geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/Http11ConnectorGBean.java
    geronimo/server/branches/2.0/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/Http11NIOConnectorGBean.java
      - copied, changed from r559530, geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/Http11NIOConnectorGBean.java
    geronimo/server/branches/2.0/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/Http11NIOProtocol.java
      - copied, changed from r559530, geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/Http11NIOProtocol.java
    geronimo/server/branches/2.0/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/Http11Protocol.java
      - copied, changed from r559530, geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/Http11Protocol.java
    geronimo/server/branches/2.0/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/Https11APRConnectorGBean.java
      - copied, changed from r560392, geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/Https11APRConnectorGBean.java
    geronimo/server/branches/2.0/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/Https11ConnectorGBean.java
      - copied, changed from r559530, geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/Https11ConnectorGBean.java
    geronimo/server/branches/2.0/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/Https11NIOConnectorGBean.java
      - copied, changed from r559530, geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/Https11NIOConnectorGBean.java
    geronimo/server/branches/2.0/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/TomcatWebConnector.java
      - copied unchanged from r559901, geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/TomcatWebConnector.java
Removed:
    geronimo/server/branches/2.0/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/ConnectorGBean.java
    geronimo/server/branches/2.0/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/HttpsConnectorGBean.java
    geronimo/server/branches/2.0/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/TomcatWebConnector.java
Modified:
    geronimo/server/branches/2.0/applications/console/geronimo-console-framework/src/main/webapp/js/forms.js
    geronimo/server/branches/2.0/applications/console/geronimo-console-standard/src/main/java/org/apache/geronimo/console/BasePortlet.java
    geronimo/server/branches/2.0/applications/console/geronimo-console-standard/src/main/java/org/apache/geronimo/console/configmanager/ConfigManagerPortlet.java
    geronimo/server/branches/2.0/applications/console/geronimo-console-standard/src/main/java/org/apache/geronimo/console/util/PortletManager.java
    geronimo/server/branches/2.0/applications/console/geronimo-console-standard/src/main/java/org/apache/geronimo/console/webmanager/ConnectorInfo.java
    geronimo/server/branches/2.0/applications/console/geronimo-console-standard/src/main/java/org/apache/geronimo/console/webmanager/ConnectorPortlet.java
    geronimo/server/branches/2.0/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/configmanager/normal.jsp
    geronimo/server/branches/2.0/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/webmanager/connector/normal.jsp
    geronimo/server/branches/2.0/configs/geronimo-gbean-deployer/src/plan/plan.xml
    geronimo/server/branches/2.0/configs/j2ee-server/src/plan/plan.xml
    geronimo/server/branches/2.0/configs/tomcat6/src/plan/plan.xml
    geronimo/server/branches/2.0/modules/geronimo-deploy-jsr88/src/main/java/org/apache/geronimo/deployment/plugin/jmx/JMXDeploymentManager.java
    geronimo/server/branches/2.0/modules/geronimo-deploy-jsr88/src/main/java/org/apache/geronimo/deployment/plugin/local/CommandSupport.java
    geronimo/server/branches/2.0/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/Deployer.java
    geronimo/server/branches/2.0/modules/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyManagerImpl.java
    geronimo/server/branches/2.0/modules/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyWebAppContext.java
    geronimo/server/branches/2.0/modules/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/connector/HTTPSSelectChannelConnector.java
    geronimo/server/branches/2.0/modules/geronimo-management/src/main/java/org/apache/geronimo/management/geronimo/WebManager.java
    geronimo/server/branches/2.0/modules/geronimo-management/src/main/java/org/apache/geronimo/management/geronimo/WebModule.java
    geronimo/server/branches/2.0/modules/geronimo-system/src/main/java/org/apache/geronimo/system/main/StartupMonitorUtil.java
    geronimo/server/branches/2.0/modules/geronimo-tomcat6-builder/src/test/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilderTest.java
    geronimo/server/branches/2.0/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/TomcatManagerImpl.java
    geronimo/server/branches/2.0/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/TomcatWebAppContext.java
    geronimo/server/branches/2.0/modules/geronimo-tomcat6/src/test/java/org/apache/geronimo/tomcat/AbstractWebModuleTest.java
    geronimo/server/branches/2.0/modules/geronimo-tomcat6/src/test/java/org/apache/geronimo/tomcat/StatTest.java

Modified: geronimo/server/branches/2.0/applications/console/geronimo-console-framework/src/main/webapp/js/forms.js
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.0/applications/console/geronimo-console-framework/src/main/webapp/js/forms.js?view=diff&rev=562021&r1=562020&r2=562021
==============================================================================
--- geronimo/server/branches/2.0/applications/console/geronimo-console-framework/src/main/webapp/js/forms.js (original)
+++ geronimo/server/branches/2.0/applications/console/geronimo-console-framework/src/main/webapp/js/forms.js Wed Aug  1 22:51:18 2007
@@ -44,6 +44,10 @@
 }
 
 function isIntegral(value){
+    // trim off the negative sign if present
+    if(value.length>1 && value.charAt(0) == "-") {
+        value = value.substring(1);
+    }
     if(value.length < 1) return false;
     var ints = "1234567890";
     for(i = 0; i < value.length; i++){

Modified: geronimo/server/branches/2.0/applications/console/geronimo-console-standard/src/main/java/org/apache/geronimo/console/BasePortlet.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.0/applications/console/geronimo-console-standard/src/main/java/org/apache/geronimo/console/BasePortlet.java?view=diff&rev=562021&r1=562020&r2=562021
==============================================================================
--- geronimo/server/branches/2.0/applications/console/geronimo-console-standard/src/main/java/org/apache/geronimo/console/BasePortlet.java (original)
+++ geronimo/server/branches/2.0/applications/console/geronimo-console-standard/src/main/java/org/apache/geronimo/console/BasePortlet.java Wed Aug  1 22:51:18 2007
@@ -76,10 +76,13 @@
     public final static Object getProperty(Object target, String name) {
         Class cls = target.getClass();
         String getter = "get"+Character.toUpperCase(name.charAt(0))+name.substring(1);
+        String booleanGetter = "is"+Character.toUpperCase(name.charAt(0))+name.substring(1);
         Method[] list = cls.getMethods();
         for (int i = 0; i < list.length; i++) {
             Method method = list[i];
-            if(method.getName().equals(getter) && method.getParameterTypes().length == 0 && Modifier.isPublic(method.getModifiers()) &&
+            String methodName = method.getName();
+            if( (methodName.equals(getter) || methodName.equals(booleanGetter))
+                && method.getParameterTypes().length == 0 && Modifier.isPublic(method.getModifiers()) &&
                     !Modifier.isStatic(method.getModifiers())) {
                 try {
                     return method.invoke(target, new Object[0]);

Modified: geronimo/server/branches/2.0/applications/console/geronimo-console-standard/src/main/java/org/apache/geronimo/console/configmanager/ConfigManagerPortlet.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.0/applications/console/geronimo-console-standard/src/main/java/org/apache/geronimo/console/configmanager/ConfigManagerPortlet.java?view=diff&rev=562021&r1=562020&r2=562021
==============================================================================
--- geronimo/server/branches/2.0/applications/console/geronimo-console-standard/src/main/java/org/apache/geronimo/console/configmanager/ConfigManagerPortlet.java (original)
+++ geronimo/server/branches/2.0/applications/console/geronimo-console-standard/src/main/java/org/apache/geronimo/console/configmanager/ConfigManagerPortlet.java Wed Aug  1 22:51:18 2007
@@ -282,7 +282,6 @@
                     WebModule webModule = (WebModule) PortletManager.getModule(renderRequest, info.getConfigID());
                     if (webModule != null) {
                         details.setContextPath(webModule.getContextPath());
-                        details.setUrlFor(webModule.getURLFor());
                     }
                 }
                 try {
@@ -384,7 +383,6 @@
         private final Artifact configId;
         private final ConfigurationModuleType type;
         private final State state;
-        private URL urlFor;             // only relevant for webapps
         private String contextPath;     // only relevant for webapps
         private List parents = new ArrayList();
         private List children = new ArrayList();
@@ -419,16 +417,8 @@
             return state;
         }
 
-        public URL getUrlFor() {
-            return urlFor;
-        }
-
         public String getContextPath() {
             return contextPath;
-        }
-
-        public void setUrlFor(URL urlFor) {
-            this.urlFor = urlFor;
         }
 
         public void setContextPath(String contextPath) {

Modified: geronimo/server/branches/2.0/applications/console/geronimo-console-standard/src/main/java/org/apache/geronimo/console/util/PortletManager.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.0/applications/console/geronimo-console-standard/src/main/java/org/apache/geronimo/console/util/PortletManager.java?view=diff&rev=562021&r1=562020&r2=562021
==============================================================================
--- geronimo/server/branches/2.0/applications/console/geronimo-console-standard/src/main/java/org/apache/geronimo/console/util/PortletManager.java (original)
+++ geronimo/server/branches/2.0/applications/console/geronimo-console-standard/src/main/java/org/apache/geronimo/console/util/PortletManager.java Wed Aug  1 22:51:18 2007
@@ -55,6 +55,7 @@
 import org.apache.geronimo.management.geronimo.JMSConnector;
 import org.apache.geronimo.management.geronimo.JMSManager;
 import org.apache.geronimo.management.geronimo.JVM;
+import org.apache.geronimo.management.geronimo.NetworkConnector;
 import org.apache.geronimo.management.geronimo.ResourceAdapter;
 import org.apache.geronimo.management.geronimo.ResourceAdapterModule;
 import org.apache.geronimo.management.geronimo.WebAccessLog;
@@ -254,27 +255,27 @@
         return manager.addConnector((WebContainer) helper.getObject(containerName), name, protocol, host, port);
     }
 
-    public static WebConnector[] getWebConnectors(PortletRequest request, AbstractName managerName) {
+    public static NetworkConnector[] getNetworkConnectors(PortletRequest request, AbstractName managerName) {
         ManagementHelper helper = getManagementHelper(request);
         WebManager manager = (WebManager) helper.getObject(managerName);
-        return (WebConnector[]) manager.getConnectors();
+        return manager.getConnectors();
     }
 
-    public static WebConnector[] getWebConnectors(PortletRequest request, AbstractName managerName, String protocol) {
+    public static NetworkConnector[] getNetworkConnectors(PortletRequest request, AbstractName managerName, String protocol) {
         ManagementHelper helper = getManagementHelper(request);
         WebManager manager = (WebManager) helper.getObject(managerName);
-        return (WebConnector[]) manager.getConnectors(protocol);
+        return manager.getConnectors(protocol);
     }
 
-    public static WebConnector getWebConnector(PortletRequest request, AbstractName connectorName) {
+    public static NetworkConnector getNetworkConnector(PortletRequest request, AbstractName connectorName) {
         ManagementHelper helper = getManagementHelper(request);
-        return (WebConnector) helper.getObject(connectorName);
+        return (NetworkConnector) helper.getObject(connectorName);
     }
 
-    public static WebConnector[] getWebConnectorsForContainer(PortletRequest request, AbstractName managerName, AbstractName containerName, String protocol) {
+    public static NetworkConnector[] getNetworkConnectorsForContainer(PortletRequest request, AbstractName managerName, AbstractName containerName, String protocol) {
         ManagementHelper helper = getManagementHelper(request);
         WebManager manager = (WebManager) helper.getObject(managerName);
-        return (WebConnector[]) manager.getConnectorsForContainer(containerName, protocol);
+        return manager.getConnectorsForContainer(containerName, protocol);
     }
 
     public static JMSBroker getJMSBroker(PortletRequest request, AbstractName brokerName) {

Modified: geronimo/server/branches/2.0/applications/console/geronimo-console-standard/src/main/java/org/apache/geronimo/console/webmanager/ConnectorInfo.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.0/applications/console/geronimo-console-standard/src/main/java/org/apache/geronimo/console/webmanager/ConnectorInfo.java?view=diff&rev=562021&r1=562020&r2=562021
==============================================================================
--- geronimo/server/branches/2.0/applications/console/geronimo-console-standard/src/main/java/org/apache/geronimo/console/webmanager/ConnectorInfo.java (original)
+++ geronimo/server/branches/2.0/applications/console/geronimo-console-standard/src/main/java/org/apache/geronimo/console/webmanager/ConnectorInfo.java Wed Aug  1 22:51:18 2007
@@ -23,7 +23,7 @@
 
 public class ConnectorInfo implements Serializable {
     private String description;
-    private String displayName;
+    private String uniqueName;
     private String connectorURI;
     private String protocol;
     private int port;
@@ -49,16 +49,16 @@
         return connectorURI;
     }
 
-    public String getDisplayName() {
-        return displayName;
+    public String getUniqueName() {
+        return uniqueName;
     }
 
     public void setConnectorURI(String connectorURI) {
         this.connectorURI = connectorURI;
     }
 
-    public void setDisplayName(String displayName) {
-        this.displayName = displayName;
+    public void setUniqueName(String uniqueName) {
+        this.uniqueName = uniqueName;
     }
 
     public int getPort() {

Modified: geronimo/server/branches/2.0/applications/console/geronimo-console-standard/src/main/java/org/apache/geronimo/console/webmanager/ConnectorPortlet.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.0/applications/console/geronimo-console-standard/src/main/java/org/apache/geronimo/console/webmanager/ConnectorPortlet.java?view=diff&rev=562021&r1=562020&r2=562021
==============================================================================
--- geronimo/server/branches/2.0/applications/console/geronimo-console-standard/src/main/java/org/apache/geronimo/console/webmanager/ConnectorPortlet.java (original)
+++ geronimo/server/branches/2.0/applications/console/geronimo-console-standard/src/main/java/org/apache/geronimo/console/webmanager/ConnectorPortlet.java Wed Aug  1 22:51:18 2007
@@ -22,16 +22,18 @@
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
-import java.util.Map;
+
 import javax.portlet.ActionRequest;
 import javax.portlet.ActionResponse;
 import javax.portlet.PortletConfig;
 import javax.portlet.PortletContext;
 import javax.portlet.PortletException;
+import javax.portlet.PortletRequest;
 import javax.portlet.PortletRequestDispatcher;
 import javax.portlet.RenderRequest;
 import javax.portlet.RenderResponse;
 import javax.portlet.WindowState;
+
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.geronimo.console.BasePortlet;
@@ -42,10 +44,12 @@
 import org.apache.geronimo.management.geronimo.KeystoreException;
 import org.apache.geronimo.management.geronimo.KeystoreInstance;
 import org.apache.geronimo.management.geronimo.KeystoreManager;
+import org.apache.geronimo.management.geronimo.NetworkConnector;
 import org.apache.geronimo.management.geronimo.SecureConnector;
-import org.apache.geronimo.management.geronimo.WebConnector;
 import org.apache.geronimo.management.geronimo.WebContainer;
 import org.apache.geronimo.management.geronimo.WebManager;
+import org.apache.geronimo.management.geronimo.WebManager.ConnectorAttribute;
+import org.apache.geronimo.management.geronimo.WebManager.ConnectorType;
 
 /**
  * A portlet that lets you list, add, remove, start, stop, and edit web
@@ -55,241 +59,146 @@
  */
 public class ConnectorPortlet extends BasePortlet {
     private final static Log log = LogFactory.getLog(ConnectorPortlet.class);
+    
+    public static final String PARM_CONTAINER_URI = "containerURI";
+    public static final String PARM_CONNECTOR_URI = "connectorURI";
+    public static final String PARM_MANAGER_URI = "managerURI";
+    public static final String PARM_MODE = "mode";
+    public static final String PARM_CONNECTOR_TYPE = "connectorType";
+    public static final String PARM_CONNECTOR_ATTRIBUTES = "connectorAttributes";
+    public static final String PARM_DISPLAY_NAME = "uniqueName";
+    public static final String PARM_SERVER = "server";
 
     private PortletRequestDispatcher normalView;
-
     private PortletRequestDispatcher maximizedView;
-
     private PortletRequestDispatcher helpView;
-
-    protected PortletRequestDispatcher editHttpView;
-    protected PortletRequestDispatcher editHttpsView;
-    
-    private final static HashMap<String, Object> TOMCAT_DEFAULTS;
-    static {
-        TOMCAT_DEFAULTS = new HashMap<String, Object>();
-        TOMCAT_DEFAULTS.put("allowTrace", Boolean.FALSE);
-        TOMCAT_DEFAULTS.put("emptySessionPath", Boolean.FALSE);
-        TOMCAT_DEFAULTS.put("enableLookups", Boolean.TRUE);
-        TOMCAT_DEFAULTS.put("maxPostSize", 2097152);
-        TOMCAT_DEFAULTS.put("maxSavePostSize", 4096);
-        TOMCAT_DEFAULTS.put("useBodyEncodingForURI", Boolean.FALSE);
-        TOMCAT_DEFAULTS.put("useIPVHosts", Boolean.FALSE);
-        TOMCAT_DEFAULTS.put("xpoweredBy", Boolean.FALSE);
-        TOMCAT_DEFAULTS.put("acceptCount", 10);
-        TOMCAT_DEFAULTS.put("bufferSize", 2048);
-        TOMCAT_DEFAULTS.put("compressableMimeType", "text/html,text/xml,text/plain");
-        TOMCAT_DEFAULTS.put("compression", "off");
-        TOMCAT_DEFAULTS.put("connectionLinger", -1);
-        TOMCAT_DEFAULTS.put("connectionTimeout", 60000);
-        TOMCAT_DEFAULTS.put("disableUploadTimeout", true);
-        TOMCAT_DEFAULTS.put("maxHttpHeaderSize", 4096);
-        TOMCAT_DEFAULTS.put("maxKeepAliveRequests", 100);
-        TOMCAT_DEFAULTS.put("maxSpareThreads", 50);
-        TOMCAT_DEFAULTS.put("minSpareThreads", 4);
-        TOMCAT_DEFAULTS.put("noCompressionUserAgents", "");
-        TOMCAT_DEFAULTS.put("restrictedUserAgents", "");
-        TOMCAT_DEFAULTS.put("socketBuffer", 9000);
-        TOMCAT_DEFAULTS.put("strategy", "lf");
-        TOMCAT_DEFAULTS.put("tcpNoDelay", true);
-        TOMCAT_DEFAULTS.put("threadPriority", Thread.NORM_PRIORITY);
-    }
+    private PortletRequestDispatcher editConnectorView;
 
     public void processAction(ActionRequest actionRequest,
                               ActionResponse actionResponse) throws PortletException, IOException {
         String submit = actionRequest.getParameter("submit");
         if ("Cancel".equalsIgnoreCase(submit)) {
             // User clicked on "Cancel" button in add/edit connector page
-            actionResponse.setRenderParameter("mode", "list");
+            actionResponse.setRenderParameter(PARM_MODE, "list");
             return;
         }
-        String mode = actionRequest.getParameter("mode");
-        String managerURI = actionRequest.getParameter("managerURI");
-        String containerURI = actionRequest.getParameter("containerURI");
-        if(managerURI != null) actionResponse.setRenderParameter("managerURI", managerURI);
-        if(containerURI != null) actionResponse.setRenderParameter("containerURI", containerURI);
-
-        String server;
+        
+        String mode = actionRequest.getParameter(PARM_MODE);
+        String managerURI = actionRequest.getParameter(PARM_MANAGER_URI);
+        String containerURI = actionRequest.getParameter(PARM_CONTAINER_URI);
+        if(managerURI != null) actionResponse.setRenderParameter(PARM_MANAGER_URI, managerURI);
+        if(containerURI != null) actionResponse.setRenderParameter(PARM_CONTAINER_URI, containerURI);
+        WebContainer webContainer  = null;
+        String server = null;
         if(containerURI != null) {
-            WebContainer container = PortletManager.getWebContainer(actionRequest, new AbstractName(URI.create(containerURI)));
-            server = getWebServerType(container.getClass());
+            webContainer = PortletManager.getWebContainer(actionRequest, new AbstractName(URI.create(containerURI)));
+            server = getWebServerType(webContainer.getClass());
         } else {
             server = "unknown";
         }
-        actionResponse.setRenderParameter("server", server);
+        actionResponse.setRenderParameter(PARM_SERVER, server);
         if(mode.equals("new")) {
             // User selected to add a new connector, need to show criteria portlet
-            actionResponse.setRenderParameter("mode", "new");
-            String protocol = actionRequest.getParameter("protocol");
-            String containerDisplayName = actionRequest.getParameter("containerDisplayName");
-            actionResponse.setRenderParameter("protocol", protocol);
-            actionResponse.setRenderParameter("containerDisplayName", containerDisplayName);
+            actionResponse.setRenderParameter(PARM_MODE, "new");
+            String connectorType = actionRequest.getParameter(PARM_CONNECTOR_TYPE);
+            actionResponse.setRenderParameter(PARM_CONNECTOR_TYPE, connectorType);
         } else if(mode.equals("add")) { // User just submitted the form to add a new connector
-            // Get submitted values
-            //todo: lots of validation
-            String protocol = actionRequest.getParameter("protocol");
-            String host = actionRequest.getParameter("host");
-            int port = Integer.parseInt(actionRequest.getParameter("port"));
-            int maxThreads = Integer.parseInt(actionRequest.getParameter("maxThreads"));
-            String displayName = actionRequest.getParameter("displayName");
             // Create and configure the connector
-            WebConnector connector = PortletManager.createWebConnector(actionRequest, new AbstractName(URI.create(managerURI)), new AbstractName(URI.create(containerURI)), displayName, protocol, host, port);
-            connector.setMaxThreads(maxThreads);
-            if (server.equals(WEB_SERVER_TOMCAT)) {
-                setTomcatAttributes(actionRequest, connector);
-            }
-            if(protocol.equals(WebManager.PROTOCOL_HTTPS)) {
-                String keystoreType = actionRequest.getParameter("keystoreType");
-                String keystoreFile = actionRequest.getParameter("keystoreFile");
-                String privateKeyPass = actionRequest.getParameter("privateKeyPassword");
-                String keystorePass = actionRequest.getParameter("keystorePassword");
-                String secureProtocol = actionRequest.getParameter("secureProtocol");
-                String algorithm = actionRequest.getParameter("algorithm");
-                String truststoreType = actionRequest.getParameter("truststoreType");
-                String truststoreFile = actionRequest.getParameter("truststoreFile");
-                String truststorePass = actionRequest.getParameter("truststorePassword");
-                String ciphers = actionRequest.getParameter("ciphers");
-                boolean clientAuth = isValid(actionRequest.getParameter("clientAuth"));
-                SecureConnector secure = (SecureConnector) connector;
-                if(isValid(keystoreType)) {
-                    secure.setKeystoreType(keystoreType);
-                } else {
-                    secure.setKeystoreType(null);
+            WebManager manager = PortletManager.getWebManager(actionRequest, new AbstractName(URI.create(managerURI)));
+            ConnectorType connectorType = new ConnectorType(actionRequest.getParameter(PARM_CONNECTOR_TYPE));
+            
+            String uniqueName = actionRequest.getParameter(PARM_DISPLAY_NAME);
+            actionResponse.setRenderParameter(PARM_DISPLAY_NAME, uniqueName);
+            // set the connector attributes from the form post
+            List<ConnectorAttribute> connectorAttributes = manager.getConnectorAttributes(connectorType);
+            for (ConnectorAttribute attribute : connectorAttributes) {
+                String name = attribute.getAttributeName();
+                String value = actionRequest.getParameter(name);
+                
+                // handle booelan type special
+                if (attribute.getAttributeClass().equals(Boolean.class)) {
+                    // browser sends value of checked checkbox as "on" or "checked"
+                    if ("on".equalsIgnoreCase(value) || "checked".equalsIgnoreCase(value)) {
+                        value=Boolean.toString(true);
+                    } else {
+                        value=Boolean.toString(false);
+                    }
                 }
-                if(isValid(keystoreFile)) {secure.setKeystoreFileName(keystoreFile);}
-                if(isValid(keystorePass)) {secure.setKeystorePassword(keystorePass);}
-                if(isValid(secureProtocol)) {secure.setSecureProtocol(secureProtocol);}
-                if(isValid(algorithm)) {secure.setAlgorithm(algorithm);}
-                secure.setClientAuthRequired(clientAuth);
-                if(server.equals(WEB_SERVER_JETTY)) {
-                    if(isValid(privateKeyPass)) {setProperty(secure, "keyPassword", privateKeyPass);}
-                    String keyStore = actionRequest.getParameter("unlockKeyStore");
-                    setProperty(secure, "keyStore", keyStore);
-                    try {
-                        KeystoreInstance[] keystores = PortletManager.getCurrentServer(actionRequest).getKeystoreManager().getKeystores();
-
-                        String[] keys = null;
-                        for (int i = 0; i < keystores.length; i++) {
-                            KeystoreInstance keystore = keystores[i];
-                            if(keystore.getKeystoreName().equals(keyStore)) {
-                                keys = keystore.getUnlockedKeys(null);
-                            }
-                        }
-                        if(keys != null && keys.length == 1) {
-                            setProperty(secure, "keyAlias", keys[0]);
-                        } else {
-                            throw new PortletException("Cannot handle keystores with anything but 1 unlocked private key");
-                        }
-                    } catch (KeystoreException e) {
-                        throw new PortletException(e);
+                // set the string form of the attribute's value as submitted by the browser
+                if (value == null || value.trim().length()<1) {
+                    // special case for KeystoreManager gbean
+                    if ("trustStore".equals(attribute.getAttributeName())) {
+                        attribute.setValue(null);
                     }
-                    String trustStore = actionRequest.getParameter("unlockTrustStore");
-                    // "" is a valid trustStore value, which means the parameter should be cleared
-                    setProperty(secure, "trustStore", isValid(trustStore) ? trustStore : null);
-                } else if (server.equals(WEB_SERVER_TOMCAT)) {
-                    if(isValid(truststoreType)) {setProperty(secure, "truststoreType", truststoreType);}
-                    if(isValid(truststoreFile)) {setProperty(secure, "truststoreFileName", truststoreFile);}
-                    if(isValid(truststorePass)) {setProperty(secure, "truststorePassword", truststorePass);}
-                    setProperty(secure, "ciphers", isValid(ciphers) ? ciphers : "");
                 } else {
-                    //todo:   Handle "should not occur" condition
+                    attribute.setStringValue(value.trim());
                 }
             }
+            // create the connector gbean based on the configuration data
+            AbstractName newConnectorName = manager.getConnectorConfiguration(connectorType, connectorAttributes, webContainer, uniqueName);
+            
+            // set the keystore properties if its a secure connector
+            setKeystoreProperties(actionRequest, newConnectorName);
+            
             // Start the connector
             try {
-                ((GeronimoManagedBean)connector).startRecursive();
+                GeronimoManagedBean managedBean = PortletManager.getManagedBean(actionRequest, newConnectorName);
+                managedBean.startRecursive();
             } catch (Exception e) {
-                log.error("Unable to start connector", e); //todo: get into rendered page somehow?
+                log.error("Unable to start connector", e); //TODO: get into rendered page
             }
-            actionResponse.setRenderParameter("mode", "list");
+            actionResponse.setRenderParameter(PARM_MODE, "list");
         } else if(mode.equals("save")) { // User just submitted the form to update a connector
             // Get submitted values
             //todo: lots of validation
-            String host = actionRequest.getParameter("host");
-            int port = Integer.parseInt(actionRequest.getParameter("port"));
-            int maxThreads = Integer.parseInt(actionRequest.getParameter("maxThreads"));
-            String connectorURI = actionRequest.getParameter("connectorURI");
+            String connectorURI = actionRequest.getParameter(PARM_CONNECTOR_URI);
             // Identify and update the connector
-            WebConnector connector = PortletManager.getWebConnector(actionRequest, new AbstractName(URI.create(connectorURI)));
+            AbstractName connectorName = new AbstractName(URI.create(connectorURI));
+            NetworkConnector connector = PortletManager.getNetworkConnector(actionRequest, connectorName);
             if(connector != null) {
-                if(!connector.getHost().equals(host)) connector.setHost(host);
-                if(connector.getPort() != port) connector.setPort(port);
-                if(connector.getMaxThreads() != maxThreads) connector.setMaxThreads(maxThreads);
-                if (server.equals(WEB_SERVER_TOMCAT)) {
-                    setTomcatAttributes(actionRequest, connector);
-                }
-                if(connector instanceof SecureConnector) {
-                    String keystoreType = actionRequest.getParameter("keystoreType");
-                    String keystoreFile = actionRequest.getParameter("keystoreFile");
-                    String privateKeyPass = actionRequest.getParameter("privateKeyPassword");
-                    String keystorePass = actionRequest.getParameter("keystorePassword");
-                    String secureProtocol = actionRequest.getParameter("secureProtocol");
-                    String algorithm = actionRequest.getParameter("algorithm");
-                    String truststoreType = actionRequest.getParameter("truststoreType");
-                    String truststoreFile = actionRequest.getParameter("truststoreFile");
-                    String truststorePass = actionRequest.getParameter("truststorePassword");
-                    String ciphers = actionRequest.getParameter("ciphers");
-                    boolean clientAuth = isValid(actionRequest.getParameter("clientAuth"));
-                    SecureConnector secure = (SecureConnector) connector;
-                    String oldVal = secure.getKeystoreType();
-                    if(isValid(keystoreType)) {
-                        if(!keystoreType.equals(oldVal))
-                            secure.setKeystoreType(keystoreType);
-                    } else {
-                        if(oldVal != null) secure.setKeystoreType(null);
-                    }
-                    if(isValid(keystoreFile) && !keystoreFile.equals(secure.getKeystoreFileName())) {secure.setKeystoreFileName(keystoreFile);}
-                    if(isValid(keystorePass)) {secure.setKeystorePassword(keystorePass);}
-                    if(isValid(secureProtocol) && !secureProtocol.equals(secure.getSecureProtocol())) {secure.setSecureProtocol(secureProtocol);}
-                    if(isValid(algorithm) && !algorithm.equals(secure.getAlgorithm())) {secure.setAlgorithm(algorithm);}
-                    if(clientAuth != secure.isClientAuthRequired()) secure.setClientAuthRequired(clientAuth);
-                    if(server.equals(WEB_SERVER_JETTY)) {
-                        if(isValid(privateKeyPass)) {setProperty(secure, "keyPassword", privateKeyPass);}
-                        String keyStore = actionRequest.getParameter("unlockKeyStore");
-                        String trustStore = actionRequest.getParameter("unlockTrustStore");
-                        setProperty(secure, "keyStore", keyStore);
-                        try {
-                            KeystoreInstance[] keystores = PortletManager.getCurrentServer(actionRequest).getKeystoreManager().getKeystores();
-
-                            String[] keys = null;
-                            for (int i = 0; i < keystores.length; i++) {
-                                KeystoreInstance keystore = keystores[i];
-                                if(keystore.getKeystoreName().equals(keyStore)) {
-                                    keys = keystore.getUnlockedKeys(null);
-                                }
-                            }
-                            if(keys != null && keys.length == 1) {
-                                setProperty(secure, "keyAlias", keys[0]);
-                            } else {
-                                throw new PortletException("Cannot handle keystores with anything but 1 unlocked private key");
-                            }
-                        } catch (KeystoreException e) {
-                            throw new PortletException(e);
-                        }
-                        // "" is a valid trustStore value, which means the parameter should be cleared
-                        setProperty(secure, "trustStore", isValid(trustStore) ? trustStore : null);
-                    }
-                    else if (server.equals(WEB_SERVER_TOMCAT)) {
-                        if(isValid(truststoreType) && !truststoreType.equals(getProperty(secure, "truststoreType"))) {setProperty(secure, "truststoreType", truststoreType);}
-                        if(isValid(truststorePass)) {setProperty(secure, "truststorePassword", truststorePass);}
-                        if(isValid(truststoreFile) && !truststoreFile.equals(getProperty(secure, "truststoreFileName"))) {setProperty(secure, "truststoreFileName", truststoreFile);}
-                        String prevVal = (String)getProperty(secure, "ciphers");
-                        if(isValid(ciphers)) {
-                            if(!ciphers.equals(prevVal)) setProperty(secure, "ciphers", ciphers);
+                WebManager manager = PortletManager.getWebManager(actionRequest, new AbstractName(URI.create(managerURI)));
+                ConnectorType connectorType = manager.getConnectorType(connectorName);
+                
+                // set the connector attributes from the form post
+                for (ConnectorAttribute attribute : manager.getConnectorAttributes(connectorType)) {
+                    String name = attribute.getAttributeName();
+                    String value = actionRequest.getParameter(name);
+                    
+                    // handle booelan type special
+                    if (attribute.getAttributeClass().equals(Boolean.class)) {
+                        // browser sends value of checked checkbox as "on" or "checked"
+                        if ("on".equalsIgnoreCase(value) || "checked".equalsIgnoreCase(value)) {
+                            value=Boolean.toString(true);
                         } else {
-                            if(prevVal != null) setProperty(secure, "ciphers", null);
+                            value=Boolean.toString(false);
                         }
                     }
-                    else {
-                        //todo:   Handle "should not occur" condition
+                    // set the string form of the attribute's value as submitted by the browser
+                    if (value == null || value.trim().length()<1) {
+                        // special case for KeystoreManager gbean
+                        if ("trustStore".equals(attribute.getAttributeName())) {
+                            setProperty(connector,name,null);
+                        }
+                    } else {
+                        // set the string value on the ConnectorAttribute so 
+                        // it can handle type conversion via getValue()
+                        try {
+                            attribute.setStringValue(value);
+                            setProperty(connector,name,attribute.getValue());
+                        } catch (Exception e) {
+                            log.error("Unable to set property " + attribute.getAttributeName(), e);
+                        }
                     }
                 }
+                
+                // set the keystore properties if its a secure connector
+                setKeystoreProperties(actionRequest, connectorName);
             }
-            actionResponse.setRenderParameter("mode", "list");
+            actionResponse.setRenderParameter(PARM_MODE, "list");
         } else if(mode.equals("start")) {
-            String connectorURI = actionRequest.getParameter("connectorURI");
+            String connectorURI = actionRequest.getParameter(PARM_CONNECTOR_URI);
             // work with the current connector to start it.
-            WebConnector connector = PortletManager.getWebConnector(actionRequest, new AbstractName(URI.create(connectorURI)));
+            NetworkConnector connector = PortletManager.getNetworkConnector(actionRequest, new AbstractName(URI.create(connectorURI)));
             if(connector != null) {
                 try {
                     ((GeronimoManagedBean)connector).startRecursive();
@@ -300,12 +209,12 @@
             else {
                 log.error("Incorrect connector reference"); //Replace this with correct error processing
             }
-            actionResponse.setRenderParameter("connectorURI", connectorURI);
-            actionResponse.setRenderParameter("mode", "list");
+            actionResponse.setRenderParameter(PARM_CONNECTOR_URI, connectorURI);
+            actionResponse.setRenderParameter(PARM_MODE, "list");
         } else if(mode.equals("stop")) {
-            String connectorURI = actionRequest.getParameter("connectorURI");
+            String connectorURI = actionRequest.getParameter(PARM_CONNECTOR_URI);
             // work with the current connector to stop it.
-            WebConnector connector = PortletManager.getWebConnector(actionRequest, new AbstractName(URI.create(connectorURI)));
+            NetworkConnector connector = PortletManager.getNetworkConnector(actionRequest, new AbstractName(URI.create(connectorURI)));
             if(connector != null) {
                 try {
                     ((GeronimoManagedBean)connector).stop();
@@ -316,268 +225,18 @@
             else {
                 log.error("Incorrect connector reference"); //Replace this with correct error processing
             }
-            actionResponse.setRenderParameter("connectorURI", connectorURI);
-            actionResponse.setRenderParameter("mode", "list");
+            actionResponse.setRenderParameter(PARM_CONNECTOR_URI, connectorURI);
+            actionResponse.setRenderParameter(PARM_MODE, "list");
         } else if(mode.equals("edit")) {
-            String connectorURI = actionRequest.getParameter("connectorURI");
-            actionResponse.setRenderParameter("connectorURI", connectorURI);
-            actionResponse.setRenderParameter("mode", "edit");
+            String connectorURI = actionRequest.getParameter(PARM_CONNECTOR_URI);
+            actionResponse.setRenderParameter(PARM_CONNECTOR_URI, connectorURI);
+            actionResponse.setRenderParameter(PARM_MODE, "edit");
 
         } else if(mode.equals("delete")) { // User chose to delete a connector
-            String connectorURI = actionRequest.getParameter("connectorURI");
+            String connectorURI = actionRequest.getParameter(PARM_CONNECTOR_URI);
             PortletManager.getWebManager(actionRequest, new AbstractName(URI.create(managerURI))).removeConnector(new AbstractName(URI.create(connectorURI)));
-            actionResponse.setRenderParameter("mode", "list");
-        }
-    }
-
-    /**
-     * This method retrieves Tomcat Connector attributes from the action request and sets the attributes in the connector.
-     * @param actionRequest
-     * @param connector
-     */
-    private void setTomcatAttributes(ActionRequest actionRequest, WebConnector connector) {
-        boolean prevBoolVal;
-        int prevIntVal;
-        String prevVal;
-        
-        boolean allowTrace = isValid(actionRequest.getParameter("allowTrace"));
-        prevBoolVal = (Boolean)getProperty(connector, "allowTrace");
-        if(allowTrace != prevBoolVal) setProperty(connector, "allowTrace", allowTrace);
-
-        boolean emptySessionPath = isValid(actionRequest.getParameter("emptySessionPath"));
-        prevBoolVal = (Boolean)callOperation(connector, "isEmptySessionPath", null);
-        if(emptySessionPath != prevBoolVal) setProperty(connector, "emptySessionPath", emptySessionPath);
-
-        boolean enableLookups = isValid(actionRequest.getParameter("enableLookups"));
-        prevBoolVal = (Boolean)callOperation(connector, "isHostLookupEnabled", null);
-        if(enableLookups != prevBoolVal) setProperty(connector, "hostLookupEnabled", enableLookups);
-
-        String maxPostSize = actionRequest.getParameter("maxPostSize");
-        prevIntVal = (Integer)getProperty(connector, "maxPostSize");
-        if(isValid(maxPostSize)) {
-            int newVal = Integer.parseInt(maxPostSize);
-            if(newVal != prevIntVal) setProperty(connector, "maxPostSize", newVal);
-        } else {
-            if(prevIntVal != (Integer)TOMCAT_DEFAULTS.get("maxPostSize")) setProperty(connector, "maxPostSize", TOMCAT_DEFAULTS.get("maxPostSize"));
-        }
-
-        String maxSavePostSize = actionRequest.getParameter("maxSavePostSize");
-        prevIntVal = (Integer)getProperty(connector, "maxSavePostSize");
-        if(isValid(maxSavePostSize)) {
-            int newVal = Integer.parseInt(maxSavePostSize);
-            if(newVal != prevIntVal) setProperty(connector, "maxSavePostSize", newVal);
-        } else {
-            if(prevIntVal != (Integer)TOMCAT_DEFAULTS.get("maxSavePostSize")) setProperty(connector, "maxSavePostSize", TOMCAT_DEFAULTS.get("maxSavePostSize"));
-        }
-
-        String proxyName = actionRequest.getParameter("proxyName");
-        prevVal = (String)getProperty(connector, "proxyName");
-        if(isValid(proxyName)) {
-            if(!proxyName.equals(prevVal)) setProperty(connector, "proxyName", proxyName);
-        } else {
-            if(prevVal != null) setProperty(connector, "proxyName", null);
-        }
-
-        String proxyPort = actionRequest.getParameter("proxyPort");
-        prevIntVal = (Integer)getProperty(connector, "proxyPort");
-        if(isValid(proxyPort)) {
-            int newVal = Integer.parseInt(proxyPort);
-            if(newVal != prevIntVal) setProperty(connector, "proxyPort", newVal);
-        } else {
-            if(prevIntVal != 0) setProperty(connector, "proxyPort", 0);
-        }
-        
-        String redirectPort = actionRequest.getParameter("redirectPort");
-        prevIntVal = connector.getRedirectPort();
-        if(isValid(redirectPort)) {
-            int newVal = Integer.parseInt(redirectPort);
-            if(newVal != prevIntVal) connector.setRedirectPort(newVal);
-        } else {
-            if(prevIntVal != 0) connector.setRedirectPort(0);
-        }
-        
-        String URIEncoding = actionRequest.getParameter("URIEncoding");
-        prevVal = (String)getProperty(connector, "uriEncoding");
-        if(isValid(URIEncoding)) {
-            if(!URIEncoding.equals(prevVal)) setProperty(connector, "uriEncoding", URIEncoding);
-        } else {
-            if(prevVal != null) setProperty(connector, "uriEncoding", null);//FIXME
-        }
-        
-        boolean useBodyEncodingForURI = isValid(actionRequest.getParameter("useBodyEncodingForURI"));
-        prevBoolVal = (Boolean)getProperty(connector, "useBodyEncodingForURI");
-        if(useBodyEncodingForURI != prevBoolVal) setProperty(connector, "useBodyEncodingForURI", useBodyEncodingForURI);
-
-        boolean useIPVHosts = isValid(actionRequest.getParameter("useIPVHosts"));
-        prevBoolVal = (Boolean)getProperty(connector, "useIPVHosts");
-        if(useIPVHosts != prevBoolVal) setProperty(connector, "useIPVHosts", useIPVHosts);
-
-        boolean xpoweredBy = isValid(actionRequest.getParameter("xpoweredBy"));
-        prevBoolVal = (Boolean)getProperty(connector, "xpoweredBy");
-        if(xpoweredBy != prevBoolVal) setProperty(connector, "xpoweredBy", xpoweredBy);
-
-        String acceptCount = actionRequest.getParameter("acceptCount");
-        prevIntVal = connector.getAcceptQueueSize();
-        if(isValid(acceptCount)) {
-            int newVal = Integer.parseInt(acceptCount);
-            if(prevIntVal != newVal) connector.setAcceptQueueSize(newVal);
-        } else {
-            if(prevIntVal != (Integer)TOMCAT_DEFAULTS.get("acceptCount")) connector.setAcceptQueueSize((Integer)TOMCAT_DEFAULTS.get("acceptCount"));
-        }
-
-        String bufferSize = actionRequest.getParameter("bufferSize");
-        prevIntVal = connector.getBufferSizeBytes();
-        if(isValid(bufferSize)) {
-            int newVal = Integer.parseInt(bufferSize);
-            if(prevIntVal != newVal) connector.setBufferSizeBytes(newVal);
-        } else {
-            if(prevIntVal != (Integer)TOMCAT_DEFAULTS.get("bufferSize")) connector.setBufferSizeBytes((Integer)TOMCAT_DEFAULTS.get("bufferSize"));
-        }
-
-        String compressableMimeType = actionRequest.getParameter("compressableMimeType");
-        prevVal = (String)getProperty(connector, "compressableMimeType");
-        if(isValid(compressableMimeType)) {
-            if(!compressableMimeType.equals(prevVal)) setProperty(connector, "compressableMimeType", compressableMimeType);
-        } else {
-            if(!TOMCAT_DEFAULTS.get("compressableMimeType").equals(prevVal)) setProperty(connector, "compressableMimeType", TOMCAT_DEFAULTS.get("compressableMimeType"));
-        }
-
-        String compression = actionRequest.getParameter("compression");
-        prevVal = (String)getProperty(connector, "compression");
-        if(isValid(compression)) {
-            if(!compression.equals(prevVal)) setProperty(connector, "compression", compression);
-        } else {
-            if(!TOMCAT_DEFAULTS.get("compression").equals(prevVal)) setProperty(connector, "compression", TOMCAT_DEFAULTS.get("compression"));
-        }
-
-        String connectionLinger = actionRequest.getParameter("connectionLinger");
-        prevIntVal = connector.getLingerMillis();
-        if(isValid(connectionLinger)) {
-            int newVal = Integer.parseInt(connectionLinger);
-            if(prevIntVal != newVal) connector.setLingerMillis(newVal);
-        } else {
-            if(prevIntVal != (Integer)TOMCAT_DEFAULTS.get("connectionLinger")) connector.setLingerMillis((Integer)TOMCAT_DEFAULTS.get("connectionLinger"));
-        }
-
-        String connectionTimeout = actionRequest.getParameter("connectionTimeout");
-        prevIntVal = (Integer)getProperty(connector, "connectionTimeoutMillis");
-        if(isValid(connectionTimeout)) {
-            int newVal = Integer.parseInt(connectionTimeout);
-            if(prevIntVal != newVal) setProperty(connector, "connectionTimeoutMillis", newVal);
-        } else {
-            if(prevIntVal != (Integer)TOMCAT_DEFAULTS.get("connectionTimeout")) setProperty(connector, "connectionTimeoutMillis", (Integer)TOMCAT_DEFAULTS.get("connectionTimeout"));
-        }
-
-        String keepAliveTimeout = actionRequest.getParameter("keepAliveTimeout");
-        prevIntVal = (Integer)getProperty(connector, "keepAliveTimeout");
-        if(isValid(keepAliveTimeout)) {
-            int newVal = Integer.parseInt(keepAliveTimeout);
-            if(prevIntVal != newVal) setProperty(connector, "keepAliveTimeout", newVal);
-        } else {
-            if(prevIntVal != (Integer)getProperty(connector, "connectionTimeoutMillis")) setProperty(connector, "keepAliveTimeout", getProperty(connector, "connectionTimeoutMillis"));
-        }
-
-        boolean disableUploadTimeout = isValid(actionRequest.getParameter("disableUploadTimeout"));
-        prevBoolVal = !(Boolean)callOperation(connector, "isUploadTimeoutEnabled", null);
-        if(disableUploadTimeout != prevBoolVal) setProperty(connector, "uploadTimeoutEnabled", !disableUploadTimeout);
-
-        String maxHttpHeaderSize = actionRequest.getParameter("maxHttpHeaderSize");
-        prevIntVal = (Integer)getProperty(connector, "maxHttpHeaderSizeBytes");
-        if(isValid(maxHttpHeaderSize)) {
-            int newVal = Integer.parseInt(maxHttpHeaderSize);
-            if(newVal != prevIntVal) setProperty(connector, "maxHttpHeaderSizeBytes", newVal);
-        } else {
-            if(prevIntVal != (Integer)TOMCAT_DEFAULTS.get("maxHttpHeaderSize")) setProperty(connector, "maxHttpHeaderSizeBytes", TOMCAT_DEFAULTS.get("maxHttpHeaderSize"));
-        }
-        
-        String maxKeepAliveRequests = actionRequest.getParameter("maxKeepAliveRequests");
-        prevIntVal = (Integer)getProperty(connector, "maxKeepAliveRequests");
-        if(isValid(maxKeepAliveRequests)) {
-            int newVal = Integer.parseInt(maxKeepAliveRequests);
-            if(prevIntVal != newVal) setProperty(connector, "maxKeepAliveRequests", newVal);
-        } else {
-            if(prevIntVal != (Integer)TOMCAT_DEFAULTS.get("maxKeepAliveRequests")) setProperty(connector, "maxKeepAliveRequests", TOMCAT_DEFAULTS.get("maxKeepAliveRequests"));
-        }
-        
-        String maxSpareThreads = actionRequest.getParameter("maxSpareThreads");
-        prevIntVal = (Integer)getProperty(connector, "maxSpareThreads");
-        if(isValid(maxSpareThreads)) {
-            int newVal =  Integer.parseInt(maxSpareThreads);
-            if(prevIntVal != newVal) setProperty(connector, "maxSpareThreads", newVal);
-        } else {
-            if(prevIntVal != (Integer)TOMCAT_DEFAULTS.get("maxSpareThreads")) setProperty(connector, "maxSpareThreads", TOMCAT_DEFAULTS.get("maxSpareThreads"));
-        }
-        
-        String minSpareThreads = actionRequest.getParameter("minSpareThreads");
-        prevIntVal = (Integer)getProperty(connector, "minSpareThreads");
-        if(isValid(minSpareThreads)) {
-            int newVal = new Integer(minSpareThreads);
-            if(prevIntVal != newVal) setProperty(connector, "minSpareThreads", newVal);
-        } else {
-            if(prevIntVal != (Integer)TOMCAT_DEFAULTS.get("minSpareThreads")) setProperty(connector, "minSpareThreads", TOMCAT_DEFAULTS.get("minSpareThreads"));
-        }
-        
-        String noCompressionUserAgents = actionRequest.getParameter("noCompressionUserAgents");
-        prevVal = (String)getProperty(connector, "noCompressionUserAgents");
-        if(isValid(noCompressionUserAgents)) {
-            if(!noCompressionUserAgents.equals(prevVal)) setProperty(connector, "noCompressionUserAgents", noCompressionUserAgents);
-        } else {
-            if(prevVal != null) setProperty(connector, "noCompressionUserAgents", TOMCAT_DEFAULTS.get("noCompressionUserAgents"));
-        }
-
-        String restrictedUserAgents = actionRequest.getParameter("restrictedUserAgents");
-        prevVal = (String)getProperty(connector, "restrictedUserAgents");
-        if(isValid(restrictedUserAgents)) {
-            if(!restrictedUserAgents.equals(prevVal)) setProperty(connector, "restrictedUserAgents", restrictedUserAgents);
-        } else {
-            if(prevVal != null) setProperty(connector, "restrictedUserAgents", TOMCAT_DEFAULTS.get("restrictedUserAgents"));
-        }
-
-        String serverAttribute = actionRequest.getParameter("serverAttribute");
-        prevVal = (String)getProperty(connector, "server");
-        if(isValid(serverAttribute)) {
-            if(!serverAttribute.equals(prevVal)) setProperty(connector, "server", serverAttribute);
-        } else {
-            if(prevVal != null) setProperty(connector, "server", null);
-        }
-
-        String socketBuffer = actionRequest.getParameter("socketBuffer");
-        prevIntVal = (Integer)getProperty(connector, "socketBuffer");
-        if(isValid(socketBuffer)) {
-            int newVal = Integer.parseInt(socketBuffer);
-            if(prevIntVal != newVal) setProperty(connector, "socketBuffer", newVal);
-        } else {
-            if(prevIntVal != (Integer)TOMCAT_DEFAULTS.get("socketBuffer")) setProperty(connector, "socketBuffer", TOMCAT_DEFAULTS.get("socketBuffer"));
-        }
-
-        String strategy = actionRequest.getParameter("strategy");
-        prevVal = (String)getProperty(connector, "strategy");
-        if(isValid(strategy)) {
-            if(!strategy.equals(prevVal)) setProperty(connector, "strategy", strategy);
-        } else {
-            if(prevVal != null) setProperty(connector, "strategy", TOMCAT_DEFAULTS.get("strategy"));
+            actionResponse.setRenderParameter(PARM_MODE, "list");
         }
-
-        boolean tcpNoDelay = isValid(actionRequest.getParameter("tcpNoDelay"));
-        prevBoolVal = connector.isTcpNoDelay();
-        if(tcpNoDelay != prevBoolVal) connector.setTcpNoDelay(tcpNoDelay);
-        
-        String threadPriority = actionRequest.getParameter("threadPriority");
-        prevIntVal = (Integer)getProperty(connector, "threadPriority");
-        if(isValid(threadPriority)) {
-            int newVal = Integer.parseInt(threadPriority);
-            if(prevIntVal != newVal) setProperty(connector, "threadPriority", newVal);
-        } else {
-            if(prevIntVal != (Integer)TOMCAT_DEFAULTS.get("threadPriority")) setProperty(connector, "threadPriority", TOMCAT_DEFAULTS.get("threadPriority"));
-        }
-    }
-
-    private Integer getInteger(ActionRequest actionRequest, String key) {
-        String value = actionRequest.getParameter(key);
-        if(value == null || value.equals("")) {
-            return null;
-        }
-        return new Integer(value);
     }
 
     protected void doView(RenderRequest renderRequest,
@@ -585,268 +244,64 @@
         if (WindowState.MINIMIZED.equals(renderRequest.getWindowState())) {
             return;
         }
-        String mode = renderRequest.getParameter("mode");
+        String mode = renderRequest.getParameter(PARM_MODE);
         if(mode == null || mode.equals("")) {
             mode = "list";
         }
 
-
         if(mode.equals("list")) {
             doList(renderRequest, renderResponse);
         } else {
-            String managerURI = renderRequest.getParameter("managerURI");
-            String containerURI = renderRequest.getParameter("containerURI");
-            if(managerURI != null) renderRequest.setAttribute("managerURI", managerURI);
-            if(containerURI != null) renderRequest.setAttribute("containerURI", containerURI);
+            String managerURI = renderRequest.getParameter(PARM_MANAGER_URI);
+            String containerURI = renderRequest.getParameter(PARM_CONTAINER_URI);
+            if(managerURI != null) renderRequest.setAttribute(PARM_MANAGER_URI, managerURI);
+            if(containerURI != null) renderRequest.setAttribute(PARM_CONTAINER_URI, containerURI);
 
             WebContainer container = PortletManager.getWebContainer(renderRequest, new AbstractName(URI.create(containerURI)));
             String server = getWebServerType(container.getClass());
-            renderRequest.setAttribute("server", server);
+            renderRequest.setAttribute(PARM_SERVER, server);
 
             if(mode.equals("new")) {
-                String protocol = renderRequest.getParameter("protocol");
-                String containerDisplayName = renderRequest.getParameter("containerDisplayName");
-                renderRequest.setAttribute("maxThreads", "50");
-                if(server.equals(WEB_SERVER_JETTY)) {
-                    KeystoreManager mgr = PortletManager.getCurrentServer(renderRequest).getKeystoreManager();
-                    KeystoreInstance[] stores = mgr.getUnlockedKeyStores();
-                    String[] storeNames = new String[stores.length];
-                    for (int i = 0; i < storeNames.length; i++) {
-                        storeNames[i] = stores[i].getKeystoreName();
-                    }
-                    renderRequest.setAttribute("keyStores", storeNames);
-                    KeystoreInstance[] trusts = mgr.getUnlockedTrustStores();
-                    String[] trustNames = new String[trusts.length];
-                    for (int i = 0; i < trustNames.length; i++) {
-                        trustNames[i] = trusts[i].getKeystoreName();
-                    }
-                    renderRequest.setAttribute("trustStores", trustNames);
-                    Map aliases = new HashMap();
-                    for (int i = 0; i < stores.length; i++) {
-                        try {
-                            aliases.put(stores[i].getKeystoreName(), stores[i].getUnlockedKeys(null));
-                        } catch (KeystoreException e) {}
-                    }
-                    renderRequest.setAttribute("unlockedKeys", aliases);
-                }
-                else if (server.equals(WEB_SERVER_TOMCAT)) {
-                    //todo:   Any Tomcat specific processing?
-                    for(String key:TOMCAT_DEFAULTS.keySet()) {
-                        Object val = TOMCAT_DEFAULTS.get(key);
-                        if(!(val instanceof Boolean))
-                            renderRequest.setAttribute(key, TOMCAT_DEFAULTS.get(key));
-                        else if((Boolean)val) // For boolean, set attribute only if it is true
-                            renderRequest.setAttribute(key, TOMCAT_DEFAULTS.get(key));
-                    }
-                }
-                else {
-                    //todo:   Handle "should not occur" condition
-                }
-                renderRequest.setAttribute("protocol", protocol);
-                renderRequest.setAttribute("mode", "add");
-                renderRequest.setAttribute("containerDisplayName", containerDisplayName);
-                if(protocol.equals(WebManager.PROTOCOL_HTTPS)) {
-                    editHttpsView.include(renderRequest, renderResponse);
-                } else {
-                    editHttpView.include(renderRequest, renderResponse);
-                }
-
+                String connectorType = renderRequest.getParameter(PARM_CONNECTOR_TYPE);
+                WebManager webManager = PortletManager.getWebManager(renderRequest, new AbstractName(URI.create(managerURI)));
+                ConnectorType type = new ConnectorType(connectorType);
+                List<ConnectorAttribute> connectorAttributes = webManager.getConnectorAttributes(type);
+                renderRequest.setAttribute(PARM_CONNECTOR_ATTRIBUTES, connectorAttributes);
+                renderRequest.setAttribute(PARM_CONNECTOR_TYPE, connectorType);
+                renderRequest.setAttribute(PARM_MODE, "add");
+                populateEnumAttributes(renderRequest);
+                editConnectorView.include(renderRequest, renderResponse);
             } else if(mode.equals("edit")) {
-                String connectorURI = renderRequest.getParameter("connectorURI");
-                WebConnector connector = PortletManager.getWebConnector(renderRequest, new AbstractName(URI.create(connectorURI)));
+                String connectorURI = renderRequest.getParameter(PARM_CONNECTOR_URI);
+                NetworkConnector connector = PortletManager.getNetworkConnector(renderRequest, new AbstractName(URI.create(connectorURI)));
                 if(connector == null) {
                     doList(renderRequest, renderResponse);
                 } else {
-                	String displayName = new AbstractName(URI.create(connectorURI)).getName().get("name").toString();
-                    renderRequest.setAttribute("displayName", displayName);
-                    renderRequest.setAttribute("connectorURI", connectorURI);
-                    renderRequest.setAttribute("port", new Integer(connector.getPort()));
-                    renderRequest.setAttribute("host", connector.getHost());
-                    int maxThreads = connector.getMaxThreads();
-                    renderRequest.setAttribute("maxThreads", Integer.toString(maxThreads));
-                    if(server.equals(WEB_SERVER_JETTY)) {
-                        KeystoreManager mgr = PortletManager.getCurrentServer(renderRequest).getKeystoreManager();
-                        KeystoreInstance[] stores = mgr.getUnlockedKeyStores();
-                        String[] storeNames = new String[stores.length];
-                        for (int i = 0; i < storeNames.length; i++) {
-                            storeNames[i] = stores[i].getKeystoreName();
-                        }
-                        renderRequest.setAttribute("keyStores", storeNames);
-                        KeystoreInstance[] trusts = mgr.getUnlockedTrustStores();
-                        String[] trustNames = new String[trusts.length];
-                        for (int i = 0; i < trustNames.length; i++) {
-                            trustNames[i] = trusts[i].getKeystoreName();
-                        }
-                        renderRequest.setAttribute("trustStores", trustNames);
-                        Map aliases = new HashMap();
-                        for (int i = 0; i < stores.length; i++) {
-                            try {
-                                aliases.put(stores[i].getKeystoreName(), stores[i].getUnlockedKeys(null));
-                            } catch (KeystoreException e) {}
-                        }
-                        renderRequest.setAttribute("unlockedKeys", aliases);
-                    }
-                    else if (server.equals(WEB_SERVER_TOMCAT)) {
-                        //todo:   Any Tomcat specific processing?
-                        Boolean allowTrace = (Boolean)getProperty(connector, "allowTrace");
-                        if(allowTrace) {
-                            renderRequest.setAttribute("allowTrace", allowTrace);
-                        }
-
-                        Boolean emptySessionPath = (Boolean)callOperation(connector, "isEmptySessionPath", null);
-                        if(emptySessionPath) {
-                            renderRequest.setAttribute("emptySessionPath", emptySessionPath);
-                        }
-
-                        Boolean enableLookups = (Boolean)callOperation(connector, "isHostLookupEnabled", null);
-                        if(enableLookups) {
-                            renderRequest.setAttribute("enableLookups", enableLookups);
-                        }
-
-                        Integer maxPostSize = (Integer)getProperty(connector, "maxPostSize");
-                        renderRequest.setAttribute("maxPostSize", maxPostSize);
-
-                        Integer maxSavePostSize = (Integer)getProperty(connector, "maxSavePostSize");
-                        renderRequest.setAttribute("maxSavePostSize", maxSavePostSize);
-
-                        String proxyName = (String)getProperty(connector, "proxyName");
-                        if(isValid(proxyName)) {
-                            renderRequest.setAttribute("proxyName", proxyName);
-                        }
-
-                        Integer proxyPort = (Integer)getProperty(connector, "proxyPort");
-                        renderRequest.setAttribute("proxyPort", proxyPort);
-
-                        Integer redirectPort = connector.getRedirectPort();
-                        renderRequest.setAttribute("redirectPort", redirectPort);
-
-                        String URIEncoding = (String)getProperty(connector, "uriEncoding");
-                        if(isValid(URIEncoding)) {
-                            renderRequest.setAttribute("URIEncoding", URIEncoding);
-                        }
-
-                        Boolean useBodyEncodingForURI = (Boolean)getProperty(connector, "useBodyEncodingForURI");
-                        if(useBodyEncodingForURI) {
-                            renderRequest.setAttribute("useBodyEncodingForURI", useBodyEncodingForURI);
-                        }
-
-                        Boolean useIPVHosts = (Boolean)getProperty(connector, "useIPVHosts");
-                        if(useBodyEncodingForURI) {
-                            renderRequest.setAttribute("useIPVHosts", useIPVHosts);
-                        }
-
-                        Boolean xpoweredBy = (Boolean)getProperty(connector, "xpoweredBy");
-                        if(useBodyEncodingForURI) {
-                            renderRequest.setAttribute("xpoweredBy", xpoweredBy);
-                        }
-
-                        Integer acceptCount = connector.getAcceptQueueSize();
-                        renderRequest.setAttribute("acceptCount", acceptCount);
-
-                        Integer bufferSize = connector.getBufferSizeBytes();
-                        renderRequest.setAttribute("bufferSize", bufferSize);
-
-                        String compressableMimeType = (String)getProperty(connector, "compressableMimeType");
-                        if(isValid(compressableMimeType)) {
-                            renderRequest.setAttribute("compressableMimeType", compressableMimeType);
-                        }
-
-                        String compression = (String)getProperty(connector, "compression");
-                        if(isValid(compression)) {
-                            renderRequest.setAttribute("compression", compression);
-                        }
-
-                        Integer connectionLinger = connector.getLingerMillis();
-                        renderRequest.setAttribute("connectionLinger", connectionLinger);
-
-                        Integer connectionTimeout = (Integer)getProperty(connector, "connectionTimeoutMillis");
-                        renderRequest.setAttribute("connectionTimeout", connectionTimeout);
-
-                        Integer keepAliveTimeout = (Integer)getProperty(connector, "keepAliveTimeout");
-                        renderRequest.setAttribute("keepAliveTimeout", keepAliveTimeout);
-
-                        Boolean disableUploadTimeout = !(Boolean)callOperation(connector, "isUploadTimeoutEnabled", null);
-                        if(disableUploadTimeout) {
-                            renderRequest.setAttribute("disableUploadTimeout", disableUploadTimeout);
-                        }
-
-                        Integer maxHttpHeaderSize = (Integer)getProperty(connector, "maxHttpHeaderSizeBytes");
-                        renderRequest.setAttribute("maxHttpHeaderSize", maxHttpHeaderSize);
-
-                        Integer maxKeepAliveRequests = (Integer)getProperty(connector, "maxKeepAliveRequests");
-                        renderRequest.setAttribute("maxKeepAliveRequests", maxKeepAliveRequests);
-
-                        Integer maxSpareThreads = (Integer)getProperty(connector, "maxSpareThreads");
-                        renderRequest.setAttribute("maxSpareThreads", maxSpareThreads);
-
-                        Integer minSpareThreads = (Integer)getProperty(connector, "minSpareThreads");
-                        renderRequest.setAttribute("minSpareThreads", minSpareThreads);
-
-                        String noCompressionUserAgents = (String)getProperty(connector, "noCompressionUserAgents");
-                        if(isValid(noCompressionUserAgents)) {
-                            renderRequest.setAttribute("noCompressionUserAgents", noCompressionUserAgents);
-                        }
-
-                        String restrictedUserAgents = (String)getProperty(connector, "restrictedUserAgents");
-                        if(isValid(restrictedUserAgents)) {
-                            renderRequest.setAttribute("restrictedUserAgents", restrictedUserAgents);
-                        }
-                        
-                        String serverAttribute = (String)getProperty(connector, "server");
-                        if(isValid(serverAttribute)) {
-                            renderRequest.setAttribute("serverAttribute", serverAttribute);
-                        }
-
-                        Integer socketBuffer = (Integer)getProperty(connector, "socketBuffer");
-                        renderRequest.setAttribute("socketBuffer", socketBuffer);
-
-                        String strategy = (String)getProperty(connector, "strategy");
-                        if(isValid(strategy)) {
-                            renderRequest.setAttribute("strategy", strategy);
-                        }
-
-                        Boolean tcpNoDelay = connector.isTcpNoDelay();
-                        if(tcpNoDelay) {
-                            renderRequest.setAttribute("tcpNoDelay", tcpNoDelay);
-                        }
-
-                        Integer threadPriority = (Integer)getProperty(connector, "threadPriority");
-                        renderRequest.setAttribute("threadPriority", threadPriority);
-                    }
-                    else {
-                        //todo:   Handle "should not occur" condition
-                    }
-                    renderRequest.setAttribute("mode", "save");
-
-                    if(connector instanceof SecureConnector) {
-                        SecureConnector secure = (SecureConnector) connector;
-                        renderRequest.setAttribute("keystoreFile",secure.getKeystoreFileName());
-                        renderRequest.setAttribute("keystoreType",secure.getKeystoreType());
-                        renderRequest.setAttribute("algorithm",secure.getAlgorithm());
-                        renderRequest.setAttribute("secureProtocol",secure.getSecureProtocol());
-                        if(secure.isClientAuthRequired()) {
-                            renderRequest.setAttribute("clientAuth", Boolean.TRUE);
-                        }
-                        if(server.equals(WEB_SERVER_JETTY)) {
-                            String keyStore = (String)getProperty(secure, "keyStore");
-                            String trustStore = (String)getProperty(secure, "trustStore");
-                            renderRequest.setAttribute("unlockKeyStore", keyStore);
-                            renderRequest.setAttribute("unlockTrustStore", trustStore);
-                        } else if(server.equals(WEB_SERVER_TOMCAT)) {
-                            String truststoreFile = (String)getProperty(secure, "truststoreFileName");
-                            String truststoreType = (String)getProperty(secure, "truststoreType");
-                            String ciphers = (String)getProperty(secure, "ciphers");
-                            renderRequest.setAttribute("truststoreFile", truststoreFile);
-                            renderRequest.setAttribute("truststoreType", truststoreType);
-                            renderRequest.setAttribute("ciphers", ciphers);
+                    AbstractName connectorName = new AbstractName(URI.create(connectorURI));
+                    String uniqueName = connectorName.getName().get("name").toString();
+                    renderRequest.setAttribute(PARM_DISPLAY_NAME, uniqueName);
+                    WebManager webManager = PortletManager.getWebManager(renderRequest, new AbstractName(URI.create(managerURI)));
+                    ConnectorType connectorType = webManager.getConnectorType(connectorName);
+                    List<ConnectorAttribute> connectorAttributes = webManager.getConnectorAttributes(connectorType);
+                    
+                    // populate the connector attributes from the connector
+                    for (ConnectorAttribute attribute : connectorAttributes) {
+                        try {
+                            Object value = getProperty(connector, attribute.getAttributeName());
+                            attribute.setValue(value);
+                        } catch (IllegalArgumentException e) {
+                            log.error("Unable to retrieve value of property " + attribute.getAttributeName(), e);
                         }
                     }
-
-                    if(connector.getProtocol().equals(WebManager.PROTOCOL_HTTPS)) {
-                        editHttpsView.include(renderRequest, renderResponse);
-                    } else {
-                        editHttpView.include(renderRequest, renderResponse);
-                    }
+                    
+                    renderRequest.setAttribute(PARM_CONNECTOR_ATTRIBUTES, connectorAttributes);
+                    renderRequest.setAttribute(PARM_CONNECTOR_URI, connectorURI);
+                    // populate any enum type values.  the browser will render them in a
+                    // <SELECT> input for the attribute
+                    populateEnumAttributes(renderRequest);
+                    
+                    renderRequest.setAttribute(PARM_MODE, "save");
+                    editConnectorView.include(renderRequest, renderResponse);
                 }
             }
         }
@@ -855,14 +310,14 @@
 
     private void doList(RenderRequest renderRequest, RenderResponse renderResponse) throws PortletException, IOException {
         WebManager[] managers = PortletManager.getWebManagers(renderRequest);
-        List all = new ArrayList();
+        List<ContainerInfo> all = new ArrayList<ContainerInfo>();
         for (int i = 0; i < managers.length; i++) {
             WebManager manager = managers[i];
             AbstractName webManagerName = PortletManager.getNameFor(renderRequest, manager);
-
+            
             WebContainer[] containers = (WebContainer[]) manager.getContainers();
             for (int j = 0; j < containers.length; j++) {
-                List beans = new ArrayList();
+                List<ConnectorInfo> beans = new ArrayList<ConnectorInfo>();
                 WebContainer container = containers[j];
                 AbstractName containerName = PortletManager.getNameFor(renderRequest, container);
                 String id;
@@ -873,14 +328,12 @@
                 }
                 ContainerInfo result = new ContainerInfo(id, webManagerName.toString(), containerName.toString());
 
-                WebConnector[] connectors = (WebConnector[]) manager.getConnectorsForContainer(container);
-                for (int k = 0; k < connectors.length; k++) {
-                    WebConnector connector = connectors[k];
+                for (NetworkConnector connector : manager.getConnectorsForContainer(container)) {
                     ConnectorInfo info = new ConnectorInfo();
                     AbstractName connectorName = PortletManager.getNameFor(renderRequest, connector);
                     info.setConnectorURI(connectorName.toString());
                     info.setDescription(PortletManager.getGBeanDescription(renderRequest, connectorName));
-                    info.setDisplayName((String)connectorName.getName().get(NameFactory.J2EE_NAME));
+                    info.setUniqueName((String)connectorName.getName().get(NameFactory.J2EE_NAME));
                     info.setState(((GeronimoManagedBean)connector).getState());
                     info.setPort(connector.getPort());
                     try {
@@ -891,7 +344,7 @@
                     beans.add(info);
                 }
                 result.setConnectors(beans);
-                result.setProtocols(manager.getSupportedProtocols());
+                result.setConnectorTypes(manager.getConnectorTypes());
                 all.add(result);
             }
         }
@@ -909,7 +362,7 @@
         private String name;
         private String managerURI;
         private String containerURI;
-        private String[] protocols;
+        private List connectorTypes;
         private List connectors;
 
         public ContainerInfo(String name, String managerURI, String containerURI) {
@@ -922,12 +375,12 @@
             return name;
         }
 
-        public String[] getProtocols() {
-            return protocols;
+        public List getConnectorTypes() {
+            return connectorTypes;
         }
 
-        public void setProtocols(String[] protocols) {
-            this.protocols = protocols;
+        public void setConnectorTypes(List connectorTypes) {
+            this.connectorTypes = connectorTypes;
         }
 
         public List getConnectors() {
@@ -958,21 +411,95 @@
         normalView = pc.getRequestDispatcher("/WEB-INF/view/webmanager/connector/normal.jsp");
         maximizedView = pc.getRequestDispatcher("/WEB-INF/view/webmanager/connector/maximized.jsp");
         helpView = pc.getRequestDispatcher("/WEB-INF/view/webmanager/connector/help.jsp");
-        editHttpView = pc.getRequestDispatcher("/WEB-INF/view/webmanager/connector/editHTTP.jsp");
-        editHttpsView = pc.getRequestDispatcher("/WEB-INF/view/webmanager/connector/editHTTPS.jsp");
+        editConnectorView = pc.getRequestDispatcher("/WEB-INF/view/webmanager/connector/editConnector.jsp");
     }
 
     public void destroy() {
         normalView = null;
         maximizedView = null;
         helpView = null;
-        editHttpsView = null;
-        editHttpView = null;
+        editConnectorView = null;
         super.destroy();
     }
 
     public static boolean isValid(String s) {
         return s != null && !s.equals("");
     }
+    
+    // stash any 'enum' type values for attributes.  right now this is
+    // hardcoded, need to promote these to the ConnectorAttribute apis
+    private void populateEnumAttributes(PortletRequest request) {
+        HashMap<String,String[]> enumValues = new HashMap<String,String[]>();
+        
+        // provide the two possible values for secure protocol - TLS and SSL
+        enumValues.put("secureProtocol", new String[] { "TLS", "SSL" }); //jetty
+        enumValues.put("sslProtocol", new String[] { "TLS", "SSL" }); //tomcat
+        
+        // keystore and truststore types for tomcat
+        enumValues.put("keystoreType", new String[] { "JKS", "PKCS12" });
+        enumValues.put("truststoreType", new String[] { "JKS", "PKCS12" });
+
+        // provide the three possible values for secure algorithm - Default, SunX509, and IbmX509 
+        enumValues.put("algorithm", new String[] { "Default", "SunX509", "IbmX509" });
+        
+        // provide the possible values for the keystore name
+        KeystoreManager mgr = PortletManager.getCurrentServer(request).getKeystoreManager();
+        KeystoreInstance[] stores = mgr.getUnlockedKeyStores();
+        String[] storeNames = new String[stores.length];
+        for (int i = 0; i < storeNames.length; i++) {
+            storeNames[i] = stores[i].getKeystoreName();
+        }
+        enumValues.put("keyStore", storeNames);
+        
+        // provide the possible values for the trust store name
+        KeystoreInstance[] trusts = mgr.getUnlockedTrustStores();
+        String[] trustNames = new String[trusts.length];
+        for (int i = 0; i < trustNames.length; i++) {
+            trustNames[i] = trusts[i].getKeystoreName();
+        }
+        enumValues.put("trustStore", trustNames);
+        
+        request.setAttribute("geronimoConsoleEnumValues", enumValues);
+    }
+    
+    // get the special keystore properties from the request and set them on the connector
+    // TODO: need a more generic way to handle this
+    private void setKeystoreProperties(PortletRequest request, AbstractName connectorName) throws PortletException {
+        String containerURI = request.getParameter(PARM_CONTAINER_URI);
+        WebContainer container = PortletManager.getWebContainer(request, new AbstractName(URI.create(containerURI)));
+        String server = getWebServerType(container.getClass());
+        NetworkConnector connector = PortletManager.getNetworkConnector(request, connectorName);
 
+        // return if not a secure connector
+        if (!(connector instanceof SecureConnector)) {
+            return;
+        }
+        
+        // right now only jetty supports the KeystoreManager
+        if (server.equals(WEB_SERVER_JETTY)) {
+            String keyStore = request.getParameter("keyStore");
+            
+            // get the unlocked keystore object from the keystore managaer
+            // gbean and set its keyalias directly on the connector 
+            try {
+                KeystoreInstance[] keystores = PortletManager.getCurrentServer(request)
+                        .getKeystoreManager().getKeystores();
+
+                String[] keys = null;
+                for (int i = 0; i < keystores.length; i++) {
+                    KeystoreInstance keystore = keystores[i];
+                    if (keystore.getKeystoreName().equals(keyStore)) {
+                        keys = keystore.getUnlockedKeys(null);
+                    }
+                }
+                if (keys != null && keys.length == 1) {
+                    setProperty(connector, "keyAlias", keys[0]);
+                } else {
+                    throw new PortletException("Cannot handle keystores with anything but 1 unlocked private key");
+                }
+            } catch (KeystoreException e) {
+                throw new PortletException(e);
+            }
+        }
+    }
 }

Modified: geronimo/server/branches/2.0/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/configmanager/normal.jsp
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.0/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/configmanager/normal.jsp?view=diff&rev=562021&r1=562020&r2=562021
==============================================================================
--- geronimo/server/branches/2.0/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/configmanager/normal.jsp (original)
+++ geronimo/server/branches/2.0/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/configmanager/normal.jsp Wed Aug  1 22:51:18 2007
@@ -42,7 +42,7 @@
     <tr>
         <td class="${backgroundClass}">&nbsp;${moduleDetails.configId}</td>
         <c:if test="${showWebInfo}">
-            <td class="${backgroundClass}">&nbsp;<c:if test="${moduleDetails.state.running}"><a href="${moduleDetails.urlFor}">${moduleDetails.contextPath}</a></c:if></td>
+            <td class="${backgroundClass}">&nbsp;<c:if test="${moduleDetails.state.running}"><a href="${moduleDetails.contextPath}">${moduleDetails.contextPath}</a></c:if></td>
         </c:if>
         <td width="100" class="${backgroundClass}">&nbsp;${moduleDetails.state}</td>
         <td width="75" class="${backgroundClass}">



Mime
View raw message