Author: yoavs
Date: Wed Mar  8 10:09:36 2006
New Revision: 384293

URL: http://svn.apache.org/viewcvs?rev=384293&view=rev
Log:
Bugzilla 38508: http://issues.apache.org/bugzilla/show_bug.cgi?id=38508

Modified:
    tomcat/container/tc5.5.x/webapps/docs/changelog.xml
    
tomcat/container/tc5.5.x/webapps/host-manager/WEB-INF/classes/org/apache/catalina/hostmanager/HTMLHostManagerServlet.java
    
tomcat/container/tc5.5.x/webapps/host-manager/WEB-INF/classes/org/apache/catalina/hostmanager/HostManagerServlet.java
    
tomcat/container/tc5.5.x/webapps/host-manager/WEB-INF/classes/org/apache/catalina/hostmanager/LocalStrings.properties

Modified: tomcat/container/tc5.5.x/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/webapps/docs/changelog.xml?rev=384293&r1=384292&r2=384293&view=diff
==============================================================================
--- tomcat/container/tc5.5.x/webapps/docs/changelog.xml (original)
+++ tomcat/container/tc5.5.x/webapps/docs/changelog.xml Wed Mar  8 10:09:36 2006
@@ -25,6 +25,14 @@
       </fix>
     </changelog>
   </subsection>
+  <subsection name="Webapps">
+    <changelog>
+      <fix>
+        <bug>38508</bug>: Several enhancements to Host Manager application, 
including configurable
+          manager app support and dialog box enhancements.  Thanks to George 
Sexton for the patch. (yoavs)
+      </fix>
+    </changelog>
+  </subsection>
 </section>
 
 <section name="Tomcat 5.5.16 (yoavs)">

Modified: 
tomcat/container/tc5.5.x/webapps/host-manager/WEB-INF/classes/org/apache/catalina/hostmanager/HTMLHostManagerServlet.java
URL: 
http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/webapps/host-manager/WEB-INF/classes/org/apache/catalina/hostmanager/HTMLHostManagerServlet.java?rev=384293&r1=384292&r2=384293&view=diff
==============================================================================
--- 
tomcat/container/tc5.5.x/webapps/host-manager/WEB-INF/classes/org/apache/catalina/hostmanager/HTMLHostManagerServlet.java
 (original)
+++ 
tomcat/container/tc5.5.x/webapps/host-manager/WEB-INF/classes/org/apache/catalina/hostmanager/HTMLHostManagerServlet.java
 Wed Mar  8 10:09:36 2006
@@ -1,5 +1,5 @@
 /*
- * Copyright 1999,2004-2005 The Apache Software Foundation.
+ * Copyright 1999,2004-2006 The Apache Software Foundation.
  * 
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -256,11 +256,16 @@
                         buf.append(", ").append(aliases[j]);
                     }
                 }
+
+                if (buf.length() == 0) {
+                    buf.append("&nbsp;");
+                }
+
                 args[1] = buf.toString();
                 writer.print
                     (MessageFormat.format(HOSTS_ROW_DETAILS_SECTION, args));
 
-                args = new Object[6];
+                args = new Object[7];
                 args[0] = response.encodeURL
                     (request.getContextPath() +
                      "/html/start?name=" + hostName);
@@ -273,6 +278,7 @@
                     (request.getContextPath() +
                      "/html/remove?name=" + hostName);
                 args[5] = hostsRemove;
+                args[6] = hostName;
                 if (host == this.host) {
                     writer.print(MessageFormat.format(
                         MANAGER_HOST_ROW_BUTTON_SECTION, args));
@@ -320,6 +326,10 @@
         args[2] = "";
         writer.print(MessageFormat.format(ADD_SECTION_BOOLEAN, args));
 
+        args[0] = sm.getString("htmlHostManagerServlet.addManager");
+        args[1] = "manager";
+        args[2] = "checked";
+        writer.print(MessageFormat.format(ADD_SECTION_BOOLEAN, args));
         
         args = new Object[1];
         args[0] = sm.getString("htmlHostManagerServlet.addButton");
@@ -375,7 +385,7 @@
 
     private static final String HOSTS_ROW_DETAILS_SECTION =
         "<tr>\n" +
-        " <td class=\"row-left\"><small><a href=\"{0}\">{0}</a>" +
+        " <td class=\"row-left\"><small><a href=\"http://{0}\";>{0}</a>" +
         "</small></td>\n" +
         " <td class=\"row-center\"><small>{1}</small></td>\n";
 
@@ -390,11 +400,11 @@
         "</tr>\n";
 
     private static final String HOSTS_ROW_BUTTON_SECTION =
-        " <td class=\"row-left\">\n" +
+        " <td class=\"row-left\" NOWRAP>\n" +
         "  <small>\n" +
-        "  &nbsp;<a href=\"{0}\" onclick=\"return(confirm('Are you 
sure?'))\">{1}</a>&nbsp;\n" +
-        "  &nbsp;<a href=\"{2}\" onclick=\"return(confirm('Are you 
sure?'))\">{3}</a>&nbsp;\n" +
-        "  &nbsp;<a href=\"{4}\" onclick=\"return(confirm('Are you 
sure?'))\">{5}</a>&nbsp;\n" +
+        "  &nbsp;<a href=\"{0}\" onclick=\"return(confirm(''{1} {6}\\n\\nAre 
you sure?''))\">{1}</a>&nbsp;\n" +
+        "  &nbsp;<a href=\"{2}\" onclick=\"return(confirm(''{3} {6}\\n\\nAre 
you sure?''))\">{3}</a>&nbsp;\n" +
+        "  &nbsp;<a href=\"{4}\" onclick=\"return(confirm(''{5} {6}\\n\\nAre 
you sure?''))\">{5}</a>&nbsp;\n" +
         "  </small>\n" +
         " </td>\n" +
         "</tr>\n";
@@ -454,7 +464,6 @@
         "  &nbsp;\n" +
         " </td>\n" +
         " <td class=\"row-left\">\n" +
-        "  <input type=\"hidden\" name=\"manager\" value=\"true\">\n" +
         "  <input type=\"submit\" value=\"{0}\">\n" +
         " </td>\n" +
         "</tr>\n" +

Modified: 
tomcat/container/tc5.5.x/webapps/host-manager/WEB-INF/classes/org/apache/catalina/hostmanager/HostManagerServlet.java
URL: 
http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/webapps/host-manager/WEB-INF/classes/org/apache/catalina/hostmanager/HostManagerServlet.java?rev=384293&r1=384292&r2=384293&view=diff
==============================================================================
--- 
tomcat/container/tc5.5.x/webapps/host-manager/WEB-INF/classes/org/apache/catalina/hostmanager/HostManagerServlet.java
 (original)
+++ 
tomcat/container/tc5.5.x/webapps/host-manager/WEB-INF/classes/org/apache/catalina/hostmanager/HostManagerServlet.java
 Wed Mar  8 10:09:36 2006
@@ -1,5 +1,5 @@
 /*
- * Copyright 1999,2004 The Apache Software Foundation.
+ * Copyright 1999,2004-2006 The Apache Software Foundation.
  * 
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -64,7 +64,7 @@
  *     attribute is a comma separated list of the host alias names. 
  *     The <code>manager</code> attribute is a boolean value indicating if the
  *     webapp manager will be installed in the newly created host (optional, 
- *     true by default).</li>
+ *     false by default).</li>
  * <li><b>/remove?name={host-name}</b> - Remove a virtual host. 
  *     The <code>host-name</code> attribute indicates the name of the host.
  *     </li>
@@ -255,15 +255,17 @@
 
 
     /**
-     * Add host with all parameter
-     * @param request
-     * @param writer
-     * @param name
+     * Add host with the given parameters.
+     *
+     * @param request The request
+     * @param writer The output writer
+     * @param name The host name
+     * @param htmlMode Flag value
      */
     protected void add(HttpServletRequest request, PrintWriter writer, String 
name, boolean htmlMode ) {
         String aliases = request.getParameter("aliases");
         String appBase = request.getParameter("appBase");
-        boolean manager = booleanParameter(request, "manager", true, htmlMode);
+        boolean manager = booleanParameter(request, "manager", false, 
htmlMode);
         boolean autoDeploy = booleanParameter(request, "autoDeploy", true, 
htmlMode);
         boolean deployOnStartup = booleanParameter(request, "deployOnStartup", 
true, htmlMode);
         boolean deployXML = booleanParameter(request, "deployXML", true, 
htmlMode);

Modified: 
tomcat/container/tc5.5.x/webapps/host-manager/WEB-INF/classes/org/apache/catalina/hostmanager/LocalStrings.properties
URL: 
http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/webapps/host-manager/WEB-INF/classes/org/apache/catalina/hostmanager/LocalStrings.properties?rev=384293&r1=384292&r2=384293&view=diff
==============================================================================
--- 
tomcat/container/tc5.5.x/webapps/host-manager/WEB-INF/classes/org/apache/catalina/hostmanager/LocalStrings.properties
 (original)
+++ 
tomcat/container/tc5.5.x/webapps/host-manager/WEB-INF/classes/org/apache/catalina/hostmanager/LocalStrings.properties
 Wed Mar  8 10:09:36 2006
@@ -39,7 +39,7 @@
 htmlHostManagerServlet.addName=Name:
 htmlHostManagerServlet.addAliases=Aliases:
 htmlHostManagerServlet.addAppBase=App base:
-htmlHostManagerServlet.addManager=Manager:
+htmlHostManagerServlet.addManager=Manager App
 htmlHostManagerServlet.addAutoDeploy=AutoDeploy
 htmlHostManagerServlet.addDeployOnStartup=DeployOnStartup
 htmlHostManagerServlet.addDeployXML=DeployXML



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to