geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vamsic...@apache.org
Subject svn commit: r545212 - in /geronimo/server/trunk: applications/console/geronimo-console-standard/src/main/java/org/apache/geronimo/console/webmanager/ applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/webmanager/connector/ modu...
Date Thu, 07 Jun 2007 15:13:58 GMT
Author: vamsic007
Date: Thu Jun  7 08:13:57 2007
New Revision: 545212

URL: http://svn.apache.org/viewvc?view=rev&rev=545212
Log:
GERONIMO-2481 WebServers portlet: Create/Edit Tomcat Connectors should support editing of all supported connector attributes

Modified:
    geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/java/org/apache/geronimo/console/webmanager/ConnectorPortlet.java
    geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/webmanager/connector/editHTTP.jsp
    geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/webmanager/connector/editHTTPS.jsp
    geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/ConnectorGBean.java
    geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/TomcatWebConnector.java

Modified: geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/java/org/apache/geronimo/console/webmanager/ConnectorPortlet.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/java/org/apache/geronimo/console/webmanager/ConnectorPortlet.java?view=diff&rev=545212&r1=545211&r2=545212
==============================================================================
--- geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/java/org/apache/geronimo/console/webmanager/ConnectorPortlet.java (original)
+++ geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/java/org/apache/geronimo/console/webmanager/ConnectorPortlet.java Thu Jun  7 08:13:57 2007
@@ -64,6 +64,36 @@
 
     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);
+    }
 
     public void processAction(ActionRequest actionRequest,
                               ActionResponse actionResponse) throws PortletException, IOException {
@@ -105,6 +135,9 @@
             // 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");
@@ -115,9 +148,14 @@
                 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);}
+                if(isValid(keystoreType)) {
+                    secure.setKeystoreType(keystoreType);
+                } else {
+                    secure.setKeystoreType(null);
+                }
                 if(isValid(keystoreFile)) {secure.setKeystoreFileName(keystoreFile);}
                 if(isValid(keystorePass)) {secure.setKeystorePassword(keystorePass);}
                 if(isValid(secureProtocol)) {secure.setSecureProtocol(secureProtocol);}
@@ -152,6 +190,7 @@
                     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
                 }
@@ -176,6 +215,9 @@
                 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");
@@ -186,9 +228,16 @@
                     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) && !keystoreType.equals(secure.getKeystoreType())) {secure.setKeystoreType(keystoreType);}
+                    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);}
@@ -224,6 +273,12 @@
                         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);
+                        } else {
+                            if(prevVal != null) setProperty(secure, "ciphers", null);
+                        }
                     }
                     else {
                         //todo:   Handle "should not occur" condition
@@ -275,6 +330,248 @@
         }
     }
 
+    /**
+     * 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"));
+        }
+
+        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("")) {
@@ -334,6 +631,13 @@
                 }
                 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
@@ -384,6 +688,130 @@
                     }
                     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
@@ -407,8 +835,10 @@
                         } 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);
                         }
                     }
 

Modified: geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/webmanager/connector/editHTTP.jsp
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/webmanager/connector/editHTTP.jsp?view=diff&rev=545212&r1=545211&r2=545212
==============================================================================
--- geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/webmanager/connector/editHTTP.jsp (original)
+++ geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/webmanager/connector/editHTTP.jsp Thu Jun  7 08:13:57 2007
@@ -102,6 +102,357 @@
     <td><div align="right"></div></td>
     <td>The maximum number of threads this connector should use to handle incoming requests</td>
   </tr>
+  
+<%-- TOMCAT CONNECTOR SPECIFIC ATTRIBUTES: START --%>
+<c:if test="${server eq 'tomcat'}">
+<%-- Common Connector Attributes --%>
+<!-- AllowTrace Field -->
+  <tr>
+    <td><div align="right">AllowTrace: </div></td>
+    <td>
+      <input type="checkbox" name="allowTrace" <c:if test="${!empty allowTrace}">CHECKED </c:if>/>
+    </td>
+  </tr>
+  <tr>
+    <td><div align="right"></div></td>
+    <td>Check to enable the TRACE HTTP method.</td>
+  </tr>
+<!-- EmptySessionPath Field -->
+  <tr>
+    <td><div align="right">EmptySessionPath: </div></td>
+    <td>
+      <input type="checkbox" name="emptySessionPath" <c:if test="${!empty emptySessionPath}">CHECKED </c:if>/>
+    </td>
+  </tr>
+  <tr>
+    <td><div align="right"></div></td>
+    <td>If checked, all paths for session cookies will be set to /.</td>
+  </tr>
+<!-- EnableLookups Field -->
+  <tr>
+    <td><div align="right">EnableLookups: </div></td>
+    <td>
+      <input type="checkbox" name="enableLookups" <c:if test="${!empty enableLookups}">CHECKED </c:if>/>
+    </td>
+  </tr>
+  <tr>
+    <td><div align="right"></div></td>
+    <td>Check if you want calls to request.getRemoteHost() to perform DNS lookups in order to return the actual host name of the remote client.  By default, DNS lookups are enabled.</td>
+  </tr>
+<!-- MaxPostSize Field -->
+  <tr>
+    <td><div align="right">MaxPostSize: </div></td>
+    <td>
+      <input name="maxPostSize" type="text" size="10" value="${maxPostSize}">
+    </td>
+  </tr>
+  <tr>
+    <td><div align="right"></div></td>
+    <td>The maximum size in bytes of the POST which will be handled by the container FORM URL parameter parsing. The limit can be disabled by setting this attribute to a value less than or equal to 0. Default value is 2097152 (2 megabytes)</td>
+  </tr>
+<!-- MaxSavePostSize Field -->
+  <tr>
+    <td><div align="right">MaxSavePostSize: </div></td>
+    <td>
+      <input name="maxSavePostSize" type="text" size="10" value="${maxSavePostSize}">
+    </td>
+  </tr>
+  <tr>
+    <td><div align="right"></div></td>
+    <td>The maximum size in bytes of the POST which will be saved/buffered by the container during FORM or CLIENT-CERT authentication. The limit can be disabled by setting this attribute to -1. Setting the attribute to zero will disable the saving of POST data during authentication . Default value is 4096 (4 kilobytes).</td>
+  </tr>
+<!-- ProxyName Field -->
+  <tr>
+    <td><div align="right">ProxyName: </div></td>
+    <td>
+      <input name="proxyName" type="text" size="30" value="${proxyName}">
+    </td>
+  </tr>
+  <tr>
+    <td><div align="right"></div></td>
+    <td>If this Connector is being used in a proxy configuration, configure this attribute to specify the server name to be returned for calls to request.getServerName().</td>
+  </tr>
+<!-- ProxyPort Field -->
+  <tr>
+    <td><div align="right">ProxyPort: </div></td>
+    <td>
+      <input name="proxyPort" type="text" size="5" value="${proxyPort}">
+    </td>
+  </tr>
+  <tr>
+    <td><div align="right"></div></td>
+    <td>If this Connector is being used in a proxy configuration, configure this attribute to specify the server port to be returned for calls to request.getServerPort().</td>
+  </tr>
+<!-- RedirectPort Field -->
+  <tr>
+    <td><div align="right">RedirectPort: </div></td>
+    <td>
+      <input name="redirectPort" type="text" size="5" value="${redirectPort}">
+    </td>
+  </tr>
+  <tr>
+    <td><div align="right"></div></td>
+    <td>If this Connector is supporting non-SSL requests, and a request is received for which a matching <security-constraint> requires SSL transport, Catalina will automatically redirect the request to the port number specified here.</td>
+  </tr>
+<!-- URIEncoding Field -->
+  <tr>
+    <td><div align="right">URIEncoding: </div></td>
+    <td>
+      <input name="URIEncoding" type="text" size="30" value="${URIEncoding}">
+    </td>
+  </tr>
+  <tr>
+    <td><div align="right"></div></td>
+    <td>This specifies the character encoding used to decode the URI bytes, after %xx decoding the URL. Default is ISO-8859-1.</td>
+  </tr>
+<!-- UseBodyEncodingForURI Field -->
+  <tr>
+    <td><div align="right">UseBodyEncodingForURI: </div></td>
+    <td>
+      <input type="checkbox" name="useBodyEncodingForURI" <c:if test="${!empty useBodyEncodingForURI}">CHECKED </c:if>/>
+    </td>
+  </tr>
+  <tr>
+    <td><div align="right"></div></td>
+    <td>Check this if the encoding specified in contentType should be used for URI query parameters, instead of using the URIEncoding.</td>
+  </tr>
+<!-- UseIPVHosts Field -->
+  <tr>
+    <td><div align="right">UseIPVHosts: </div></td>
+    <td>
+      <input type="checkbox" name="useIPVHosts" <c:if test="${!empty useIPVHosts}">CHECKED </c:if>/>
+    </td>
+  </tr>
+  <tr>
+    <td><div align="right"></div></td>
+    <td>Check this to cause Tomcat to use the IP address that the request was recieved on to determine the Host to send the request to.</td>
+  </tr>
+<!-- XpoweredBy Field -->
+  <tr>
+    <td><div align="right">XpoweredBy: </div></td>
+    <td>
+      <input type="checkbox" name="xpoweredBy" <c:if test="${!empty xpoweredBy}">CHECKED </c:if>/>
+    </td>
+  </tr>
+  <tr>
+    <td><div align="right"></div></td>
+    <td>Check this to cause Tomcat to advertise support for the Servlet specification using the header recommended in the specification.</td>
+  </tr>
+
+<%-- HTTP Attributes --%>  
+<!-- AcceptCount Field -->
+  <tr>
+    <td><div align="right">AcceptCount: </div></td>
+    <td>
+      <input name="acceptCount" type="text" size="5" value="${acceptCount}">
+    </td>
+  </tr>
+  <tr>
+    <td><div align="right"></div></td>
+    <td>The maximum queue length for incoming connection requests when all possible request processing threads are in use. Any requests received when the queue is full will be refused. The default value is 10.</td>
+  </tr>
+<!-- BufferSize Field -->
+  <tr>
+    <td><div align="right">BufferSize: </div></td>
+    <td>
+      <input name="bufferSize" type="text" size="5" value="${bufferSize}">
+    </td>
+  </tr>
+  <tr>
+    <td><div align="right"></div></td>
+    <td>The size (in bytes) of the buffer to be provided for input streams created by this connector. By default, buffers of 2048 bytes will be provided.</td>
+  </tr>
+<!-- CompressableMimeType Field -->
+  <tr>
+    <td><div align="right">CompressableMimeType: </div></td>
+    <td>
+      <input name="compressableMimeType" type="text" size="30" value="${compressableMimeType}">
+    </td>
+  </tr>
+  <tr>
+    <td><div align="right"></div></td>
+    <td>The value is a comma separated list of MIME types for which HTTP compression may be used. The default value is text/html,text/xml,text/plain.</td>
+  </tr>
+<!-- Compression Field -->
+  <tr>
+    <td><div align="right">Compression: </div></td>
+    <td>
+      <input name="compression" type="text" size="30" value="${compression}">
+    </td>
+  </tr>
+  <tr>
+    <td><div align="right"></div></td>
+    <td>The Connector may use HTTP/1.1 GZIP compression in an attempt to save server bandwidth. The acceptable values for the parameter is "off" (disable compression), "on" (allow compression, which causes text data to be compressed), "force" (forces compression in all cases), or a numerical integer value (which is equivalent to "on", but specifies the minimum amount of data before the output is compressed). If the content-length is not known and compression is set to "on" or more aggressive, the output will also be compressed. If not specified, this attribute is set to "off".</td>
+  </tr>
+<!-- ConnectionLinger Field -->
+  <tr>
+    <td><div align="right">ConnectionLinger: </div></td>
+    <td>
+      <input name="connectionLinger" type="text" size="5" value="${connectionLinger}">
+    </td>
+  </tr>
+  <tr>
+    <td><div align="right"></div></td>
+    <td>The number of milliseconds during which the sockets used by this Connector will linger when they are closed. The default value is -1 (socket linger is disabled).</td>
+  </tr>
+<!-- ConnectionTimeout Field -->
+  <tr>
+    <td><div align="right">ConnectionTimeout: </div></td>
+    <td>
+      <input name="connectionTimeout" type="text" size="5" value="${connectionTimeout}">
+    </td>
+  </tr>
+  <tr>
+    <td><div align="right"></div></td>
+    <td>The number of milliseconds this Connector will wait, after accepting a connection, for the request URI line to be presented. The default value is 60000 (i.e. 60 seconds).</td>
+  </tr>
+<!-- KeepAliveTimeout Field -->
+  <tr>
+    <td><div align="right">KeepAliveTimeout: </div></td>
+    <td>
+      <input name="keepAliveTimeout" type="text" size="5" value="${keepAliveTimeout}">
+    </td>
+  </tr>
+  <tr>
+    <td><div align="right"></div></td>
+    <td>The number of milliseconds this Connector will wait, subsequent request before closing the connection. The default value is to use the value that has been set for the connectionTimeout.</td>
+  </tr>
+<!-- DisableUploadTimeout Field -->
+  <tr>
+    <td><div align="right">DisableUploadTimeout: </div></td>
+    <td>
+      <input type="checkbox" name="disableUploadTimeout" <c:if test="${!empty disableUploadTimeout}">CHECKED </c:if>/>
+    </td>
+  </tr>
+  <tr>
+    <td><div align="right"></div></td>
+    <td>This flag allows the servlet container to use a different, longer connection timeout while a servlet is being executed, which in the end allows either the servlet a longer amount of time to complete its execution, or a longer timeout during data upload. If not specified, this attribute is set to "true".</td>
+  </tr>
+<!-- MaxHttpHeaderSize Field -->
+  <tr>
+    <td><div align="right">MaxHttpHeaderSize: </div></td>
+    <td>
+      <input name="maxHttpHeaderSize" type="text" size="10" value="${maxHttpHeaderSize}">
+    </td>
+  </tr>
+  <tr>
+    <td><div align="right"></div></td>
+    <td>The maximum size of the request and response HTTP header, specified in bytes. If not specified, this attribute is set to 4096 (4 KB).</td>
+  </tr>
+<!-- maxKeepAliveRequests Field -->
+  <tr>
+    <td><div align="right">MaxKeepAliveRequests: </div></td>
+    <td>
+      <input name="maxKeepAliveRequests" type="text" size="10" value="${maxKeepAliveRequests}">
+    </td>
+  </tr>
+  <tr>
+    <td><div align="right"></div></td>
+    <td>The maximum number of HTTP requests which can be pipelined until the connection is closed by the server. Setting this attribute to 1 will disable HTTP/1.0 keep-alive, as well as HTTP/1.1 keep-alive and pipelining. Setting this to -1 will allow an unlimited amount of pipelined or keep-alive HTTP requests. If not specified, this attribute is set to 100.</td>
+  </tr>
+<!-- maxSpareThreads Field -->
+  <tr>
+    <td><div align="right">MaxSpareThreads: </div></td>
+    <td>
+      <input name="maxSpareThreads" type="text" size="10" value="${maxSpareThreads}">
+    </td>
+  </tr>
+  <tr>
+    <td><div align="right"></div></td>
+    <td>The maximum number of unused request processing threads that will be allowed to exist until the thread pool starts stopping the unnecessary threads. The default value is 50.</td>
+  </tr>
+<!-- minSpareThreads Field -->
+  <tr>
+    <td><div align="right">MinSpareThreads: </div></td>
+    <td>
+      <input name="minSpareThreads" type="text" size="10" value="${minSpareThreads}">
+    </td>
+  </tr>
+  <tr>
+    <td><div align="right"></div></td>
+    <td>The number of request processing threads that will be created when this Connector is first started. The connector will also make sure it has the specified number of idle processing threads available. This attribute should be set to a value smaller than that set for maxThreads. The default value is 4.</td>
+  </tr>
+<!-- noCompressionUserAgents Field -->
+  <tr>
+    <td><div align="right">NoCompressionUserAgents: </div></td>
+    <td>
+      <input name="noCompressionUserAgents" type="text" size="30" value="${noCompressionUserAgents}">
+    </td>
+  </tr>
+  <tr>
+    <td><div align="right"></div></td>
+    <td>The value is a comma separated list of regular expressions matching user-agents of HTTP clients for which compression should not be used, because these clients, although they do advertise support for the feature, have a broken implementation. The default value is an empty String (regexp matching disabled).</td>
+  </tr>
+<!-- restrictedUserAgents Field -->
+  <tr>
+    <td><div align="right">RestrictedUserAgents: </div></td>
+    <td>
+      <input name="restrictedUserAgents" type="text" size="30" value="${restrictedUserAgents}">
+    </td>
+  </tr>
+  <tr>
+    <td><div align="right"></div></td>
+    <td>The value is a comma separated list of regular expressions matching user-agents of HTTP clients for which HTTP/1.1 or HTTP/1.0 keep alive should not be used, even if the clients advertise support for these features. The default value is an empty String (regexp matching disabled).</td>
+  </tr>
+<!-- server Field -->
+  <tr>
+    <td><div align="right">Server: </div></td>
+    <td>
+      <input name="serverAttribute" type="text" size="30" value="${serverAttribute}">
+    </td>
+  </tr>
+  <tr>
+    <td><div align="right"></div></td>
+    <td>The Server header for the http response. Unless your paranoid, you won't need this feature. (No offense.  The description is taken from Tomcat documentation.)</td>
+  </tr>
+<!-- socketBuffer Field -->
+  <tr>
+    <td><div align="right">SocketBuffer: </div></td>
+    <td>
+      <input name="socketBuffer" type="text" size="10" value="${socketBuffer}">
+    </td>
+  </tr>
+  <tr>
+    <td><div align="right"></div></td>
+    <td>The size (in bytes) of the buffer to be provided for socket output buffering. -1 can be specified to disable the use of a buffer. By default, a buffers of 9000 bytes will be used.</td>
+  </tr>
+<!-- strategy Field -->
+  <tr>
+    <td><div align="right">Strategy: </div></td>
+    <td>
+      <input name="strategy" type="text" size="30" value="${strategy}">
+    </td>
+  </tr>
+  <tr>
+    <td><div align="right"></div></td>
+    <td>The thread pooling strategy which will be used. The default strategy does not use a master thread, but a more conventional strategy using a master listener thread can be used by setting "ms" as this attribute's value. The master strategy will work significantly better using the threadPriority attribute, which will apply only to the thread which listens on the server socket. This is set to lf by default.</td>
+  </tr>
+<!-- tcpNoDelay Field -->
+  <tr>
+    <td><div align="right">TcpNoDelay: </div></td>
+    <td>
+      <input type="checkbox" name="tcpNoDelay" <c:if test="${!empty tcpNoDelay}">CHECKED </c:if>/>
+    </td>
+  </tr>
+  <tr>
+    <td><div align="right"></div></td>
+    <td>If checked, the TCP_NO_DELAY option will be set on the server socket, which improves performance under most circumstances.</td>
+  </tr>
+<!-- threadPriority Field -->
+  <tr>
+    <td><div align="right">ThreadPriority: </div></td>
+    <td>
+      <input name="threadPriority" type="text" size="30" value="${threadPriority}">
+    </td>
+  </tr>
+  <tr>
+    <td><div align="right"></div></td>
+    <td>The priority of the request processing threads within the JVM. The default value is java.lang.Thread#NORM_PRIORITY. See the JavaDoc for the java.lang.Thread class for more details on what this priority means.</td>
+  </tr>
+  
+</c:if>
+<%-- TOMCAT CONNECTOR SPECIFIC ATTRIBUTES: END --%>
+
 <!-- Submit Button -->
   <tr>
     <td><div align="right"></div></td>

Modified: geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/webmanager/connector/editHTTPS.jsp
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/webmanager/connector/editHTTPS.jsp?view=diff&rev=545212&r1=545211&r2=545212
==============================================================================
--- geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/webmanager/connector/editHTTPS.jsp (original)
+++ geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/webmanager/connector/editHTTPS.jsp Thu Jun  7 08:13:57 2007
@@ -112,6 +112,356 @@
     <td>The maximum number of threads this connector should use to handle incoming requests</td>
   </tr>
 
+<%-- TOMCAT CONNECTOR SPECIFIC ATTRIBUTES: START --%>
+<c:if test="${server eq 'tomcat'}">
+<%-- Common Connector Attributes --%>
+<!-- AllowTrace Field -->
+  <tr>
+    <td><div align="right">AllowTrace: </div></td>
+    <td>
+      <input type="checkbox" name="allowTrace" <c:if test="${!empty allowTrace}">CHECKED </c:if>/>
+    </td>
+  </tr>
+  <tr>
+    <td><div align="right"></div></td>
+    <td>Check to enable the TRACE HTTP method.</td>
+  </tr>
+<!-- EmptySessionPath Field -->
+  <tr>
+    <td><div align="right">EmptySessionPath: </div></td>
+    <td>
+      <input type="checkbox" name="emptySessionPath" <c:if test="${!empty emptySessionPath}">CHECKED </c:if>/>
+    </td>
+  </tr>
+  <tr>
+    <td><div align="right"></div></td>
+    <td>If checked, all paths for session cookies will be set to /.</td>
+  </tr>
+<!-- EnableLookups Field -->
+  <tr>
+    <td><div align="right">EnableLookups: </div></td>
+    <td>
+      <input type="checkbox" name="enableLookups" <c:if test="${!empty enableLookups}">CHECKED </c:if>/>
+    </td>
+  </tr>
+  <tr>
+    <td><div align="right"></div></td>
+    <td>Check if you want calls to request.getRemoteHost() to perform DNS lookups in order to return the actual host name of the remote client.  By default, DNS lookups are enabled.</td>
+  </tr>
+<!-- MaxPostSize Field -->
+  <tr>
+    <td><div align="right">MaxPostSize: </div></td>
+    <td>
+      <input name="maxPostSize" type="text" size="10" value="${maxPostSize}">
+    </td>
+  </tr>
+  <tr>
+    <td><div align="right"></div></td>
+    <td>The maximum size in bytes of the POST which will be handled by the container FORM URL parameter parsing. The limit can be disabled by setting this attribute to a value less than or equal to 0. Default value is 2097152 (2 megabytes)</td>
+  </tr>
+<!-- MaxSavePostSize Field -->
+  <tr>
+    <td><div align="right">MaxSavePostSize: </div></td>
+    <td>
+      <input name="maxSavePostSize" type="text" size="10" value="${maxSavePostSize}">
+    </td>
+  </tr>
+  <tr>
+    <td><div align="right"></div></td>
+    <td>The maximum size in bytes of the POST which will be saved/buffered by the container during FORM or CLIENT-CERT authentication. The limit can be disabled by setting this attribute to -1. Setting the attribute to zero will disable the saving of POST data during authentication . Default value is 4096 (4 kilobytes).</td>
+  </tr>
+<!-- ProxyName Field -->
+  <tr>
+    <td><div align="right">ProxyName: </div></td>
+    <td>
+      <input name="proxyName" type="text" size="30" value="${proxyName}">
+    </td>
+  </tr>
+  <tr>
+    <td><div align="right"></div></td>
+    <td>If this Connector is being used in a proxy configuration, configure this attribute to specify the server name to be returned for calls to request.getServerName().</td>
+  </tr>
+<!-- ProxyPort Field -->
+  <tr>
+    <td><div align="right">ProxyPort: </div></td>
+    <td>
+      <input name="proxyPort" type="text" size="5" value="${proxyPort}">
+    </td>
+  </tr>
+  <tr>
+    <td><div align="right"></div></td>
+    <td>If this Connector is being used in a proxy configuration, configure this attribute to specify the server port to be returned for calls to request.getServerPort().</td>
+  </tr>
+<!-- RedirectPort Field -->
+  <tr>
+    <td><div align="right">RedirectPort: </div></td>
+    <td>
+      <input name="redirectPort" type="text" size="5" value="${redirectPort}">
+    </td>
+  </tr>
+  <tr>
+    <td><div align="right"></div></td>
+    <td>If this Connector is supporting non-SSL requests, and a request is received for which a matching <security-constraint> requires SSL transport, Catalina will automatically redirect the request to the port number specified here.</td>
+  </tr>
+<!-- URIEncoding Field -->
+  <tr>
+    <td><div align="right">URIEncoding: </div></td>
+    <td>
+      <input name="URIEncoding" type="text" size="30" value="${URIEncoding}">
+    </td>
+  </tr>
+  <tr>
+    <td><div align="right"></div></td>
+    <td>This specifies the character encoding used to decode the URI bytes, after %xx decoding the URL. Default is ISO-8859-1.</td>
+  </tr>
+<!-- UseBodyEncodingForURI Field -->
+  <tr>
+    <td><div align="right">UseBodyEncodingForURI: </div></td>
+    <td>
+      <input type="checkbox" name="useBodyEncodingForURI" <c:if test="${!empty useBodyEncodingForURI}">CHECKED </c:if>/>
+    </td>
+  </tr>
+  <tr>
+    <td><div align="right"></div></td>
+    <td>Check this if the encoding specified in contentType should be used for URI query parameters, instead of using the URIEncoding.</td>
+  </tr>
+<!-- UseIPVHosts Field -->
+  <tr>
+    <td><div align="right">UseIPVHosts: </div></td>
+    <td>
+      <input type="checkbox" name="useIPVHosts" <c:if test="${!empty useIPVHosts}">CHECKED </c:if>/>
+    </td>
+  </tr>
+  <tr>
+    <td><div align="right"></div></td>
+    <td>Check this to cause Tomcat to use the IP address that the request was recieved on to determine the Host to send the request to.</td>
+  </tr>
+<!-- XpoweredBy Field -->
+  <tr>
+    <td><div align="right">XpoweredBy: </div></td>
+    <td>
+      <input type="checkbox" name="xpoweredBy" <c:if test="${!empty xpoweredBy}">CHECKED </c:if>/>
+    </td>
+  </tr>
+  <tr>
+    <td><div align="right"></div></td>
+    <td>Check this to cause Tomcat to advertise support for the Servlet specification using the header recommended in the specification.</td>
+  </tr>
+
+<%-- HTTP Attributes --%>  
+<!-- AcceptCount Field -->
+  <tr>
+    <td><div align="right">AcceptCount: </div></td>
+    <td>
+      <input name="acceptCount" type="text" size="5" value="${acceptCount}">
+    </td>
+  </tr>
+  <tr>
+    <td><div align="right"></div></td>
+    <td>The maximum queue length for incoming connection requests when all possible request processing threads are in use. Any requests received when the queue is full will be refused. The default value is 10.</td>
+  </tr>
+<!-- BufferSize Field -->
+  <tr>
+    <td><div align="right">BufferSize: </div></td>
+    <td>
+      <input name="bufferSize" type="text" size="5" value="${bufferSize}">
+    </td>
+  </tr>
+  <tr>
+    <td><div align="right"></div></td>
+    <td>The size (in bytes) of the buffer to be provided for input streams created by this connector. By default, buffers of 2048 bytes will be provided.</td>
+  </tr>
+<!-- CompressableMimeType Field -->
+  <tr>
+    <td><div align="right">CompressableMimeType: </div></td>
+    <td>
+      <input name="compressableMimeType" type="text" size="30" value="${compressableMimeType}">
+    </td>
+  </tr>
+  <tr>
+    <td><div align="right"></div></td>
+    <td>The value is a comma separated list of MIME types for which HTTP compression may be used. The default value is text/html,text/xml,text/plain.</td>
+  </tr>
+<!-- Compression Field -->
+  <tr>
+    <td><div align="right">Compression: </div></td>
+    <td>
+      <input name="compression" type="text" size="30" value="${compression}">
+    </td>
+  </tr>
+  <tr>
+    <td><div align="right"></div></td>
+    <td>The Connector may use HTTP/1.1 GZIP compression in an attempt to save server bandwidth. The acceptable values for the parameter is "off" (disable compression), "on" (allow compression, which causes text data to be compressed), "force" (forces compression in all cases), or a numerical integer value (which is equivalent to "on", but specifies the minimum amount of data before the output is compressed). If the content-length is not known and compression is set to "on" or more aggressive, the output will also be compressed. If not specified, this attribute is set to "off".</td>
+  </tr>
+<!-- ConnectionLinger Field -->
+  <tr>
+    <td><div align="right">ConnectionLinger: </div></td>
+    <td>
+      <input name="connectionLinger" type="text" size="5" value="${connectionLinger}">
+    </td>
+  </tr>
+  <tr>
+    <td><div align="right"></div></td>
+    <td>The number of milliseconds during which the sockets used by this Connector will linger when they are closed. The default value is -1 (socket linger is disabled).</td>
+  </tr>
+<!-- ConnectionTimeout Field -->
+  <tr>
+    <td><div align="right">ConnectionTimeout: </div></td>
+    <td>
+      <input name="connectionTimeout" type="text" size="5" value="${connectionTimeout}">
+    </td>
+  </tr>
+  <tr>
+    <td><div align="right"></div></td>
+    <td>The number of milliseconds this Connector will wait, after accepting a connection, for the request URI line to be presented. The default value is 60000 (i.e. 60 seconds).</td>
+  </tr>
+<!-- KeepAliveTimeout Field -->
+  <tr>
+    <td><div align="right">KeepAliveTimeout: </div></td>
+    <td>
+      <input name="keepAliveTimeout" type="text" size="5" value="${keepAliveTimeout}">
+    </td>
+  </tr>
+  <tr>
+    <td><div align="right"></div></td>
+    <td>The number of milliseconds this Connector will wait, subsequent request before closing the connection. The default value is to use the value that has been set for the connectionTimeout.</td>
+  </tr>
+<!-- DisableUploadTimeout Field -->
+  <tr>
+    <td><div align="right">DisableUploadTimeout: </div></td>
+    <td>
+      <input type="checkbox" name="disableUploadTimeout" <c:if test="${!empty disableUploadTimeout}">CHECKED </c:if>/>
+    </td>
+  </tr>
+  <tr>
+    <td><div align="right"></div></td>
+    <td>This flag allows the servlet container to use a different, longer connection timeout while a servlet is being executed, which in the end allows either the servlet a longer amount of time to complete its execution, or a longer timeout during data upload. If not specified, this attribute is set to "true".</td>
+  </tr>
+<!-- MaxHttpHeaderSize Field -->
+  <tr>
+    <td><div align="right">MaxHttpHeaderSize: </div></td>
+    <td>
+      <input name="maxHttpHeaderSize" type="text" size="10" value="${maxHttpHeaderSize}">
+    </td>
+  </tr>
+  <tr>
+    <td><div align="right"></div></td>
+    <td>The maximum size of the request and response HTTP header, specified in bytes. If not specified, this attribute is set to 4096 (4 KB).</td>
+  </tr>
+<!-- maxKeepAliveRequests Field -->
+  <tr>
+    <td><div align="right">MaxKeepAliveRequests: </div></td>
+    <td>
+      <input name="maxKeepAliveRequests" type="text" size="10" value="${maxKeepAliveRequests}">
+    </td>
+  </tr>
+  <tr>
+    <td><div align="right"></div></td>
+    <td>The maximum number of HTTP requests which can be pipelined until the connection is closed by the server. Setting this attribute to 1 will disable HTTP/1.0 keep-alive, as well as HTTP/1.1 keep-alive and pipelining. Setting this to -1 will allow an unlimited amount of pipelined or keep-alive HTTP requests. If not specified, this attribute is set to 100.</td>
+  </tr>
+<!-- maxSpareThreads Field -->
+  <tr>
+    <td><div align="right">MaxSpareThreads: </div></td>
+    <td>
+      <input name="maxSpareThreads" type="text" size="10" value="${maxSpareThreads}">
+    </td>
+  </tr>
+  <tr>
+    <td><div align="right"></div></td>
+    <td>The maximum number of unused request processing threads that will be allowed to exist until the thread pool starts stopping the unnecessary threads. The default value is 50.</td>
+  </tr>
+<!-- minSpareThreads Field -->
+  <tr>
+    <td><div align="right">MinSpareThreads: </div></td>
+    <td>
+      <input name="minSpareThreads" type="text" size="10" value="${minSpareThreads}">
+    </td>
+  </tr>
+  <tr>
+    <td><div align="right"></div></td>
+    <td>The number of request processing threads that will be created when this Connector is first started. The connector will also make sure it has the specified number of idle processing threads available. This attribute should be set to a value smaller than that set for maxThreads. The default value is 4.</td>
+  </tr>
+<!-- noCompressionUserAgents Field -->
+  <tr>
+    <td><div align="right">NoCompressionUserAgents: </div></td>
+    <td>
+      <input name="noCompressionUserAgents" type="text" size="30" value="${noCompressionUserAgents}">
+    </td>
+  </tr>
+  <tr>
+    <td><div align="right"></div></td>
+    <td>The value is a comma separated list of regular expressions matching user-agents of HTTP clients for which compression should not be used, because these clients, although they do advertise support for the feature, have a broken implementation. The default value is an empty String (regexp matching disabled).</td>
+  </tr>
+<!-- restrictedUserAgents Field -->
+  <tr>
+    <td><div align="right">RestrictedUserAgents: </div></td>
+    <td>
+      <input name="restrictedUserAgents" type="text" size="30" value="${restrictedUserAgents}">
+    </td>
+  </tr>
+  <tr>
+    <td><div align="right"></div></td>
+    <td>The value is a comma separated list of regular expressions matching user-agents of HTTP clients for which HTTP/1.1 or HTTP/1.0 keep alive should not be used, even if the clients advertise support for these features. The default value is an empty String (regexp matching disabled).</td>
+  </tr>
+<!-- server Field -->
+  <tr>
+    <td><div align="right">Server: </div></td>
+    <td>
+      <input name="serverAttribute" type="text" size="30" value="${serverAttribute}">
+    </td>
+  </tr>
+  <tr>
+    <td><div align="right"></div></td>
+    <td>The Server header for the http response. Unless your paranoid, you won't need this feature. (No offense.  The description is taken from Tomcat documentation.)</td>
+  </tr>
+<!-- socketBuffer Field -->
+  <tr>
+    <td><div align="right">SocketBuffer: </div></td>
+    <td>
+      <input name="socketBuffer" type="text" size="10" value="${socketBuffer}">
+    </td>
+  </tr>
+  <tr>
+    <td><div align="right"></div></td>
+    <td>The size (in bytes) of the buffer to be provided for socket output buffering. -1 can be specified to disable the use of a buffer. By default, a buffers of 9000 bytes will be used.</td>
+  </tr>
+<!-- strategy Field -->
+  <tr>
+    <td><div align="right">Strategy: </div></td>
+    <td>
+      <input name="strategy" type="text" size="30" value="${strategy}">
+    </td>
+  </tr>
+  <tr>
+    <td><div align="right"></div></td>
+    <td>The thread pooling strategy which will be used. The default strategy does not use a master thread, but a more conventional strategy using a master listener thread can be used by setting "ms" as this attribute's value. The master strategy will work significantly better using the threadPriority attribute, which will apply only to the thread which listens on the server socket. This is set to lf by default.</td>
+  </tr>
+<!-- tcpNoDelay Field -->
+  <tr>
+    <td><div align="right">TcpNoDelay: </div></td>
+    <td>
+      <input type="checkbox" name="tcpNoDelay" <c:if test="${!empty tcpNoDelay}">CHECKED </c:if>/>
+    </td>
+  </tr>
+  <tr>
+    <td><div align="right"></div></td>
+    <td>If checked, the TCP_NO_DELAY option will be set on the server socket, which improves performance under most circumstances.</td>
+  </tr>
+<!-- threadPriority Field -->
+  <tr>
+    <td><div align="right">ThreadPriority: </div></td>
+    <td>
+      <input name="threadPriority" type="text" size="30" value="${threadPriority}">
+    </td>
+  </tr>
+  <tr>
+    <td><div align="right"></div></td>
+    <td>The priority of the request processing threads within the JVM. The default value is java.lang.Thread#NORM_PRIORITY. See the JavaDoc for the java.lang.Thread class for more details on what this priority means.</td>
+  </tr>
+  
+</c:if>
+<%-- TOMCAT CONNECTOR SPECIFIC ATTRIBUTES: END --%>
+
 <%-- END OF PART THAT SHOULD BE THE SAME AS THE HTTP CONNECTOR --%>
 
   <tr>
@@ -209,7 +559,8 @@
         <td><div align="right">Keystore Type: </div></td>
         <td>
           <select name="keystoreType">
-            <option<c:if test="${keystoreType eq 'JKS' || keystoreType eq '' || empty(keystoreType)}"> selected</c:if>>JKS</option>
+            <option<c:if test="${keystoreType eq '' || empty(keystoreType)}"> selected</c:if>></option>
+            <option<c:if test="${keystoreType eq 'JKS'}"> selected</c:if>>JKS</option>
             <option<c:if test="${keystoreType eq 'PKCS12'}"> selected</c:if>>PKCS12</option>
           </select>
         </td>
@@ -328,6 +679,19 @@
     </td>
   </tr>
 
+  <!-- Ciphers Field -->
+  <tr>
+    <td><div align="right">Ciphers: </div></td>
+    <td>
+      <input name="ciphers" type="text" size="30" value="${ciphers}">
+    </td>
+  </tr>
+  <tr>
+    <td><div align="right"></div></td>
+    <td>A comma seperated list of the encryption ciphers that may be used. 
+        If not specified, then any available cipher may be used.
+    </td>
+  </tr>
 
 
 <!-- Submit Button -->

Modified: geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/ConnectorGBean.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/ConnectorGBean.java?view=diff&rev=545212&r1=545211&r2=545212
==============================================================================
--- geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/ConnectorGBean.java (original)
+++ geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/ConnectorGBean.java Thu Jun  7 08:13:57 2007
@@ -575,7 +575,15 @@
     public String getStrategy() {
         return (String) connector.getAttribute("strategy");
     }
+
+    public int getKeepAliveTimeout() {
+        Object value = connector.getAttribute("keepAliveTimeout");
+        return value == null ? getConnectionTimeoutMillis() :Integer.parseInt(value.toString());
+    }
     
+    public void setKeepAliveTimeout(int keepAliveTimeout) {
+        connector.setAttribute("keepAliveTimeout", keepAliveTimeout);
+    }
 //  JSR77 stuff
     public String getObjectName() {
         return name; // really an objectName
@@ -651,14 +659,45 @@
                         "restrictedUserAgents",
                         "threadPriority",
                         "server",
-                        "strategy"
+                        "strategy",
+                        "keepAliveTimeout"
                 },
 
                 new String[]{
                         "host",
                         "port",
+                        "bufferSizeBytes",
+                        "maxThreads",
+                        "acceptQueueSize",
+                        "lingerMillis",
+                        "tcpNoDelay",
                         "redirectPort",
-                        "maxThreads"});
+                        "minSpareThreads",
+                        "maxSpareThreads",
+                        "maxHttpHeaderSizeBytes",
+                        "hostLookupEnabled",
+                        "connectionTimeoutMillis",
+                        "uploadTimeoutEnabled",
+                        "maxPostSize",
+                        "maxSavePostSize",
+                        "emptySessionPath",
+                        "maxKeepAliveRequests",
+                        "socketBuffer",
+                        "useBodyEncodingForURI",
+                        "allowTrace",
+                        "proxyName",
+                        "proxyPort",
+                        "uriEncoding",
+                        "useIPVHosts",
+                        "xpoweredBy",
+                        "compressableMimeType",
+                        "compression",
+                        "noCompressionUserAgents",
+                        "restrictedUserAgents",
+                        "threadPriority",
+                        "server",
+                        "strategy",
+                        "keepAliveTimeout"});
         infoFactory.setConstructor(new String[] { "name", "protocol", "host", "port", "TomcatContainer"});
         GBEAN_INFO = infoFactory.getBeanInfo();
     }

Modified: geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/TomcatWebConnector.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/TomcatWebConnector.java?view=diff&rev=545212&r1=545211&r2=545212
==============================================================================
--- geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/TomcatWebConnector.java (original)
+++ geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/TomcatWebConnector.java Thu Jun  7 08:13:57 2007
@@ -78,4 +78,6 @@
     public String getServer();
     public void setStrategy(String strategy);
     public String getStrategy();
+    public int getKeepAliveTimeout();
+    public void setKeepAliveTimeout(int keepAliveTimeout);
 }



Mime
View raw message