[wsas-java-dev] svn commit r110 - in wsas/java/trunk/modules/servlet-edition: conf/tomcat/4.x src/org/wso2/wsas

svn at wso2.com svn at wso2.com
Sat Dec 2 02:59:20 PST 2006


Author: azeez
Date: Sat Dec  2 02:59:20 2006
New Revision: 110

Modified:
   wsas/java/trunk/modules/servlet-edition/conf/tomcat/4.x/server.xml
   wsas/java/trunk/modules/servlet-edition/src/org/wso2/wsas/Tomcat41xServerInfo.java
Log:
pick the proper ports

Modified: wsas/java/trunk/modules/servlet-edition/conf/tomcat/4.x/server.xml
==============================================================================
--- wsas/java/trunk/modules/servlet-edition/conf/tomcat/4.x/server.xml	(original)
+++ wsas/java/trunk/modules/servlet-edition/conf/tomcat/4.x/server.xml	Sat Dec  2 02:59:20 2006
@@ -99,14 +99,6 @@
      to 0 -->
 
     <!-- Define a SSL Coyote HTTP/1.1 Connector on port 8443 -->
-    <!--
-    <Connector className="org.apache.coyote.tomcat4.CoyoteConnector"
-               port="8443" enableLookups="true" scheme="https" secure="true"
-               acceptCount="100"
-               useURIValidationHack="false" disableUploadTimeout="true"
-               clientAuth="false" sslProtocol="TLS" />
-    -->
-
     <Connector className="org.apache.coyote.tomcat4.CoyoteConnector"
                port="9443" minProcessors="5" maxProcessors="75"
                enableLookups="true"

Modified: wsas/java/trunk/modules/servlet-edition/src/org/wso2/wsas/Tomcat41xServerInfo.java
==============================================================================
--- wsas/java/trunk/modules/servlet-edition/src/org/wso2/wsas/Tomcat41xServerInfo.java	(original)
+++ wsas/java/trunk/modules/servlet-edition/src/org/wso2/wsas/Tomcat41xServerInfo.java	Sat Dec  2 02:59:20 2006
@@ -41,6 +41,9 @@
     private String keystorePass;
     private Properties props;
 
+    private boolean isHttpPortSet;
+    private boolean isHttpsPortSet;
+
     public void setProperties(Properties props) {
         this.props = props;
     }
@@ -76,26 +79,29 @@
                 OMAttribute classNameAttr = omEle.getAttribute(new QName("className"));
                 OMAttribute schemeAttr = omEle.getAttribute(new QName("scheme"));
                 if (classNameAttr != null &&
-                    classNameAttr.getAttributeValue().
-                            equals("org.apache.coyote.tomcat4.CoyoteConnector") &&
-                                                                                schemeAttr != null &&
-                                                                                schemeAttr.getAttributeValue().equalsIgnoreCase("https"))
-                { // This is an HTTPS connector
-                    httpsPort =
-                            Integer.parseInt(omEle.getAttribute(new QName("port")).
-                                    getAttributeValue());
-
-                    OMElement factoryEle = omEle.getFirstChildWithName(new QName("Factory"));
-                    keystoreFile
-                            = factoryEle.getAttribute(new QName("keystoreFile")).getAttributeValue();
-                    keystorePass
-                            = factoryEle.getAttribute(new QName("keystorePass")).getAttributeValue();
+                    classNameAttr.getAttributeValue().equals("org.apache.coyote.tomcat4.CoyoteConnector") &&
+                    schemeAttr != null &&
+                    schemeAttr.getAttributeValue().equalsIgnoreCase("https")) { // This is an HTTPS connector
+                    if (!isHttpsPortSet) {
+                        httpsPort =
+                                Integer.parseInt(omEle.getAttribute(new QName("port")).
+                                        getAttributeValue());
+                        isHttpsPortSet = true;
+                        OMElement factoryEle = omEle.getFirstChildWithName(new QName("Factory"));
+                        keystoreFile
+                                = factoryEle.getAttribute(new QName("keystoreFile")).getAttributeValue();
+                        keystorePass
+                                = factoryEle.getAttribute(new QName("keystorePass")).getAttributeValue();
+                    }
                 } else if (classNameAttr != null &&
                            classNameAttr.getAttributeValue().
                                    equals("org.apache.coyote.tomcat4.CoyoteConnector")) {
-                    httpPort =
-                            Integer.parseInt(omEle.getAttribute(new QName("port")).
-                                    getAttributeValue());
+                    if (!isHttpPortSet) {
+                        httpPort =
+                                Integer.parseInt(omEle.getAttribute(new QName("port")).
+                                        getAttributeValue());
+                        isHttpPortSet = true;
+                    }
                 }
             }
 




More information about the Wsas-java-dev mailing list