ASF Bugzilla – Attachment 17586 Details for
Bug 38508
Patch: Small fixes and cosmetic - Host-Manager
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch with modifications
host-manager.diff (text/plain), 8.00 KB, created by
George Sexton
on 2006-02-04 16:49:45 UTC
(
hide
)
Description:
Patch with modifications
Filename:
MIME Type:
Creator:
George Sexton
Created:
2006-02-04 16:49:45 UTC
Size:
8.00 KB
patch
obsolete
>diff -rBbU5 apache-tomcat-5.5.15-src/container/webapps/host-manager/WEB-INF/classes/org/apache/catalina/hostmanager/HostManagerServlet.java tomcat/container/webapps/host-manager/WEB-INF/classes/org/apache/catalina/hostmanager/HostManagerServlet.java >--- apache-tomcat-5.5.15-src/container/webapps/host-manager/WEB-INF/classes/org/apache/catalina/hostmanager/HostManagerServlet.java 2006-01-03 08:15:14.000000000 -0700 >+++ tomcat/container/webapps/host-manager/WEB-INF/classes/org/apache/catalina/hostmanager/HostManagerServlet.java 2006-02-03 12:47:55.000000000 -0700 >@@ -62,11 +62,11 @@ > * Create and add a new virtual host. The <code>host-name</code> attribute > * indicates the name of the new host. The <code>host-aliases</code> > * 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> > * <li><b>/list</b> - List the virtual hosts installed on the server. > * Each host will be listed with the following format >@@ -261,11 +261,11 @@ > * @param name > */ > 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); > boolean unpackWARs = booleanParameter(request, "unpackWARs", true, htmlMode); > boolean xmlNamespaceAware = booleanParameter(request, "xmlNamespaceAware", false, htmlMode); >diff -rBbU5 apache-tomcat-5.5.15-src/container/webapps/host-manager/WEB-INF/classes/org/apache/catalina/hostmanager/HTMLHostManagerServlet.java tomcat/container/webapps/host-manager/WEB-INF/classes/org/apache/catalina/hostmanager/HTMLHostManagerServlet.java >--- apache-tomcat-5.5.15-src/container/webapps/host-manager/WEB-INF/classes/org/apache/catalina/hostmanager/HTMLHostManagerServlet.java 2006-01-03 08:15:14.000000000 -0700 >+++ tomcat/container/webapps/host-manager/WEB-INF/classes/org/apache/catalina/hostmanager/HTMLHostManagerServlet.java 2006-02-04 08:29:56.000000000 -0700 >@@ -1,7 +1,7 @@ > /* >- * 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. > * You may obtain a copy of the License at > * >@@ -254,15 +254,18 @@ > buf.append(aliases[0]); > for (int j = 1; j < aliases.length; j++) { > buf.append(", ").append(aliases[j]); > } > } >+ if (buf.length()==0) { >+ buf.append(" "); >+ } > 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); > args[1] = hostsStart; > args[2] = response.encodeURL >@@ -271,10 +274,11 @@ > args[3] = hostsStop; > args[4] = response.encodeURL > (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)); > } else { > writer.print(MessageFormat.format( >@@ -317,11 +321,14 @@ > writer.print(MessageFormat.format(ADD_SECTION_BOOLEAN, args)); > args[0] = sm.getString("htmlHostManagerServlet.addXmlValidation"); > args[1] = "xmlValidation"; > 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"); > writer.print(MessageFormat.format(ADD_SECTION_END, args)); > >@@ -373,11 +380,11 @@ > " <td class=\"header-center\"><small>{2}</small></td>\n" + > "</tr>\n"; > > 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"; > > private static final String MANAGER_HOST_ROW_BUTTON_SECTION = > " <td class=\"row-left\">\n" + >@@ -388,15 +395,15 @@ > " </small>\n" + > " </td>\n" + > "</tr>\n"; > > private static final String HOSTS_ROW_BUTTON_SECTION = >- " <td class=\"row-left\">\n" + >+ " <td class=\"row-left\" NOWRAP>\n" + > " <small>\n" + >- " <a href=\"{0}\" onclick=\"return(confirm('Are you sure?'))\">{1}</a> \n" + >- " <a href=\"{2}\" onclick=\"return(confirm('Are you sure?'))\">{3}</a> \n" + >- " <a href=\"{4}\" onclick=\"return(confirm('Are you sure?'))\">{5}</a> \n" + >+ " <a href=\"{0}\" onclick=\"return(confirm(''{1} {6}\\n\\nAre you sure?''))\">{1}</a> \n" + >+ " <a href=\"{2}\" onclick=\"return(confirm(''{3} {6}\\n\\nAre you sure?''))\">{3}</a> \n" + >+ " <a href=\"{4}\" onclick=\"return(confirm(''{5} {6}\\n\\nAre you sure?''))\">{5}</a> \n" + > " </small>\n" + > " </td>\n" + > "</tr>\n"; > > private static final String ADD_SECTION_START = >@@ -452,11 +459,10 @@ > "<tr>\n" + > " <td class=\"row-right\">\n" + > " \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" + > "</table>\n" + > "</form>\n" + >diff -rBbU5 apache-tomcat-5.5.15-src/container/webapps/host-manager/WEB-INF/classes/org/apache/catalina/hostmanager/LocalStrings.properties tomcat/container/webapps/host-manager/WEB-INF/classes/org/apache/catalina/hostmanager/LocalStrings.properties >--- apache-tomcat-5.5.15-src/container/webapps/host-manager/WEB-INF/classes/org/apache/catalina/hostmanager/LocalStrings.properties 2006-01-03 08:15:14.000000000 -0700 >+++ tomcat/container/webapps/host-manager/WEB-INF/classes/org/apache/catalina/hostmanager/LocalStrings.properties 2006-01-24 16:32:16.000000000 -0700 >@@ -37,11 +37,11 @@ > htmlHostManagerServlet.addTitle=Add Virtual Host > htmlHostManagerServlet.addHost=Host > 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 > htmlHostManagerServlet.addUnpackWARs=UnpackWARs > htmlHostManagerServlet.addXmlNamespaceAware=XmlNamespaceAware >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 38508
: 17586