tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r505759 - in /tomcat/container/tc5.5.x: catalina/src/share/org/apache/catalina/mbeans/ webapps/admin/WEB-INF/classes/org/apache/webapp/admin/connector/ webapps/docs/
Date Sat, 10 Feb 2007 20:20:48 GMT
Author: markt
Date: Sat Feb 10 12:20:48 2007
New Revision: 505759

URL: http://svn.apache.org/viewvc?view=rev&rev=505759
Log:
Fix bug 41493. Admin webapp now handles APR connectors correctly.

Modified:
    tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/mbeans/ConnectorMBean.java
    tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/mbeans/MBeanFactory.java
    tomcat/container/tc5.5.x/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/connector/EditConnectorAction.java
    tomcat/container/tc5.5.x/webapps/docs/changelog.xml

Modified: tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/mbeans/ConnectorMBean.java
URL: http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/mbeans/ConnectorMBean.java?view=diff&rev=505759&r1=505758&r2=505759
==============================================================================
--- tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/mbeans/ConnectorMBean.java
(original)
+++ tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/mbeans/ConnectorMBean.java
Sat Feb 10 12:20:48 2007
@@ -127,7 +127,12 @@
 
         try {
             Connector connector = (Connector) getManagedResource();
-            IntrospectionUtils.setProperty(connector, name, String.valueOf(value));
+            if (value == null) {
+                IntrospectionUtils.setProperty(connector, name, null);
+            } else {
+                IntrospectionUtils.setProperty(connector, name,
+                        String.valueOf(value)); 
+            }
         } catch (InstanceNotFoundException e) {
             throw new MBeanException(e);
         } catch (InvalidTargetObjectTypeException e) {

Modified: tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/mbeans/MBeanFactory.java
URL: http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/mbeans/MBeanFactory.java?view=diff&rev=505759&r1=505758&r2=505759
==============================================================================
--- tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/mbeans/MBeanFactory.java
(original)
+++ tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/mbeans/MBeanFactory.java
Sat Feb 10 12:20:48 2007
@@ -319,14 +319,17 @@
      */
     private String createConnector(String parent, String address, int port, boolean isAjp,
boolean isSSL)
         throws Exception {
-        Connector retobj = new Connector();
+        Connector retobj;
+        if (isAjp) {
+            retobj = new Connector("AJP/1.3");
+        } else {
+            retobj = new Connector("HTTP/1.1");
+        }
         if ((address!=null) && (address.length()>0)) {
             retobj.setProperty("address", address);
         }
         // Set port number
         retobj.setPort(port);
-        // Set the protocol
-        retobj.setProtocol(isAjp ? "AJP/1.3" : "HTTP/1.1");
         // Set SSL
         retobj.setSecure(isSSL);
         retobj.setScheme(isSSL ? "https" : "http");

Modified: tomcat/container/tc5.5.x/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/connector/EditConnectorAction.java
URL: http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/connector/EditConnectorAction.java?view=diff&rev=505759&r1=505758&r2=505759
==============================================================================
--- tomcat/container/tc5.5.x/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/connector/EditConnectorAction.java
(original)
+++ tomcat/container/tc5.5.x/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/connector/EditConnectorAction.java
Sat Feb 10 12:20:48 2007
@@ -131,10 +131,12 @@
             int period = handlerClassName.lastIndexOf('.');
             String connType = handlerClassName.substring(period + 1);
             String connectorType = "HTTPS";
-            if ("JkCoyoteHandler".equalsIgnoreCase(connType)) {
+            if ("JkCoyoteHandler".equalsIgnoreCase(connType) ||
+                    "AjpAprProtocol".equalsIgnoreCase(connType)) {
                 connectorType = "AJP";
-            } else if ("Http11Protocol".equalsIgnoreCase(connType) && 
-                      ("http".equalsIgnoreCase(scheme))) {
+            } else if (("Http11Protocol".equalsIgnoreCase(connType)  ||
+                    "Http11AprProtocol".equalsIgnoreCase(connType)) && 
+                    ("http".equalsIgnoreCase(scheme))) {
                 connectorType = "HTTP";
             }             
             connectorFm.setConnectorType(connectorType);            

Modified: tomcat/container/tc5.5.x/webapps/docs/changelog.xml
URL: http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/webapps/docs/changelog.xml?view=diff&rev=505759&r1=505758&r2=505759
==============================================================================
--- tomcat/container/tc5.5.x/webapps/docs/changelog.xml (original)
+++ tomcat/container/tc5.5.x/webapps/docs/changelog.xml Sat Feb 10 12:20:48 2007
@@ -182,7 +182,7 @@
         Make provided instances of RequestDispatcher thread safe. (markt)
       </fix>
       <fix>
-        Fix formatting of CGI variab;e SCRIPT_NAME. (markt)
+        Fix formatting of CGI variable SCRIPT_NAME. (markt)
       </fix>
       <fix>
         <bug>34643</bug>: Improved documentation for per-user / per-session clientAuth
@@ -362,6 +362,10 @@
       <fix>
         <bug>41182</bug>: Update the Jasper documentation for the classpath
         attribute. (markt)
+      </fix>
+      <fix>
+        <bug>41493</bug>: Fix handling of APR connectors in Admin webapp.
+        (markt)
       </fix>
       <fix>
         <bug>41512</bug>: Version number was not inserted in release notes.



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


Mime
View raw message