View | Details | Raw Unified | Return to bug 38508
Collapse All | Expand All

(-)apache-tomcat-5.5.15-src/container/webapps/host-manager/WEB-INF/classes/org/apache/catalina/hostmanager/HostManagerServlet.java (-2 / +2 lines)
Lines 62-72 Link Here
62
 *     Create and add a new virtual host. The <code>host-name</code> attribute
62
 *     Create and add a new virtual host. The <code>host-name</code> attribute
63
 *     indicates the name of the new host. The <code>host-aliases</code> 
63
 *     indicates the name of the new host. The <code>host-aliases</code> 
64
 *     attribute is a comma separated list of the host alias names. 
64
 *     attribute is a comma separated list of the host alias names. 
65
 *     The <code>manager</code> attribute is a boolean value indicating if the
65
 *     The <code>manager</code> attribute is a boolean value indicating if the
66
 *     webapp manager will be installed in the newly created host (optional, 
66
 *     webapp manager will be installed in the newly created host (optional, 
67
 *     true by default).</li>
67
 *     false by default).</li>
68
 * <li><b>/remove?name={host-name}</b> - Remove a virtual host. 
68
 * <li><b>/remove?name={host-name}</b> - Remove a virtual host. 
69
 *     The <code>host-name</code> attribute indicates the name of the host.
69
 *     The <code>host-name</code> attribute indicates the name of the host.
70
 *     </li>
70
 *     </li>
71
 * <li><b>/list</b> - List the virtual hosts installed on the server.
71
 * <li><b>/list</b> - List the virtual hosts installed on the server.
72
 *     Each host will be listed with the following format 
72
 *     Each host will be listed with the following format 
Lines 261-271 Link Here
261
     * @param name
261
     * @param name
262
     */
262
     */
263
    protected void add(HttpServletRequest request, PrintWriter writer, String name, boolean htmlMode ) {
263
    protected void add(HttpServletRequest request, PrintWriter writer, String name, boolean htmlMode ) {
264
        String aliases = request.getParameter("aliases");
264
        String aliases = request.getParameter("aliases");
265
        String appBase = request.getParameter("appBase");
265
        String appBase = request.getParameter("appBase");
266
        boolean manager = booleanParameter(request, "manager", true, htmlMode);
266
        boolean manager = booleanParameter(request, "manager", false, htmlMode);
267
        boolean autoDeploy = booleanParameter(request, "autoDeploy", true, htmlMode);
267
        boolean autoDeploy = booleanParameter(request, "autoDeploy", true, htmlMode);
268
        boolean deployOnStartup = booleanParameter(request, "deployOnStartup", true, htmlMode);
268
        boolean deployOnStartup = booleanParameter(request, "deployOnStartup", true, htmlMode);
269
        boolean deployXML = booleanParameter(request, "deployXML", true, htmlMode);
269
        boolean deployXML = booleanParameter(request, "deployXML", true, htmlMode);
270
        boolean unpackWARs = booleanParameter(request, "unpackWARs", true, htmlMode);
270
        boolean unpackWARs = booleanParameter(request, "unpackWARs", true, htmlMode);
271
        boolean xmlNamespaceAware = booleanParameter(request, "xmlNamespaceAware", false, htmlMode);
271
        boolean xmlNamespaceAware = booleanParameter(request, "xmlNamespaceAware", false, htmlMode);
(-)apache-tomcat-5.5.15-src/container/webapps/host-manager/WEB-INF/classes/org/apache/catalina/hostmanager/HTMLHostManagerServlet.java (-9 / +15 lines)
Lines 1-7 Link Here
1
/*
1
/*
2
 * Copyright 1999,2004-2005 The Apache Software Foundation.
2
 * Copyright 1999,2004-2006 The Apache Software Foundation.
3
 * 
3
 * 
4
 * Licensed under the Apache License, Version 2.0 (the "License");
4
 * Licensed under the Apache License, Version 2.0 (the "License");
5
 * you may not use this file except in compliance with the License.
5
 * you may not use this file except in compliance with the License.
6
 * You may obtain a copy of the License at
6
 * You may obtain a copy of the License at
7
 * 
7
 * 
Lines 254-268 Link Here
254
                    buf.append(aliases[0]);
254
                    buf.append(aliases[0]);
255
                    for (int j = 1; j < aliases.length; j++) {
255
                    for (int j = 1; j < aliases.length; j++) {
256
                        buf.append(", ").append(aliases[j]);
256
                        buf.append(", ").append(aliases[j]);
257
                    }
257
                    }
258
                }
258
                }
259
				if (buf.length()==0) {
260
					buf.append("&nbsp;");
261
				}
259
                args[1] = buf.toString();
262
                args[1] = buf.toString();
260
                writer.print
263
                writer.print
261
                    (MessageFormat.format(HOSTS_ROW_DETAILS_SECTION, args));
264
                    (MessageFormat.format(HOSTS_ROW_DETAILS_SECTION, args));
262
265
263
                args = new Object[6];
266
                args = new Object[7];
264
                args[0] = response.encodeURL
267
                args[0] = response.encodeURL
265
                    (request.getContextPath() +
268
                    (request.getContextPath() +
266
                     "/html/start?name=" + hostName);
269
                     "/html/start?name=" + hostName);
267
                args[1] = hostsStart;
270
                args[1] = hostsStart;
268
                args[2] = response.encodeURL
271
                args[2] = response.encodeURL
Lines 271-280 Link Here
271
                args[3] = hostsStop;
274
                args[3] = hostsStop;
272
                args[4] = response.encodeURL
275
                args[4] = response.encodeURL
273
                    (request.getContextPath() +
276
                    (request.getContextPath() +
274
                     "/html/remove?name=" + hostName);
277
                     "/html/remove?name=" + hostName);
275
                args[5] = hostsRemove;
278
                args[5] = hostsRemove;
279
				args[6] = hostName;
276
                if (host == this.host) {
280
                if (host == this.host) {
277
                    writer.print(MessageFormat.format(
281
                    writer.print(MessageFormat.format(
278
                        MANAGER_HOST_ROW_BUTTON_SECTION, args));
282
                        MANAGER_HOST_ROW_BUTTON_SECTION, args));
279
                } else {
283
                } else {
280
                    writer.print(MessageFormat.format(
284
                    writer.print(MessageFormat.format(
Lines 317-327 Link Here
317
        writer.print(MessageFormat.format(ADD_SECTION_BOOLEAN, args));
321
        writer.print(MessageFormat.format(ADD_SECTION_BOOLEAN, args));
318
        args[0] = sm.getString("htmlHostManagerServlet.addXmlValidation");
322
        args[0] = sm.getString("htmlHostManagerServlet.addXmlValidation");
319
        args[1] = "xmlValidation";
323
        args[1] = "xmlValidation";
320
        args[2] = "";
324
        args[2] = "";
321
        writer.print(MessageFormat.format(ADD_SECTION_BOOLEAN, args));
325
        writer.print(MessageFormat.format(ADD_SECTION_BOOLEAN, args));
322
326
        args[0] = sm.getString("htmlHostManagerServlet.addManager");
327
		args[1] = "manager";
328
		args[2] = "checked";
329
		writer.print(MessageFormat.format(ADD_SECTION_BOOLEAN, args));
323
        
330
        
324
        args = new Object[1];
331
        args = new Object[1];
325
        args[0] = sm.getString("htmlHostManagerServlet.addButton");
332
        args[0] = sm.getString("htmlHostManagerServlet.addButton");
326
        writer.print(MessageFormat.format(ADD_SECTION_END, args));
333
        writer.print(MessageFormat.format(ADD_SECTION_END, args));
327
334
Lines 373-383 Link Here
373
        " <td class=\"header-center\"><small>{2}</small></td>\n" +
380
        " <td class=\"header-center\"><small>{2}</small></td>\n" +
374
        "</tr>\n";
381
        "</tr>\n";
375
382
376
    private static final String HOSTS_ROW_DETAILS_SECTION =
383
    private static final String HOSTS_ROW_DETAILS_SECTION =
377
        "<tr>\n" +
384
        "<tr>\n" +
378
        " <td class=\"row-left\"><small><a href=\"{0}\">{0}</a>" +
385
        " <td class=\"row-left\"><small><a href=\"http://{0}\">{0}</a>" +
379
        "</small></td>\n" +
386
        "</small></td>\n" +
380
        " <td class=\"row-center\"><small>{1}</small></td>\n";
387
        " <td class=\"row-center\"><small>{1}</small></td>\n";
381
388
382
    private static final String MANAGER_HOST_ROW_BUTTON_SECTION =
389
    private static final String MANAGER_HOST_ROW_BUTTON_SECTION =
383
        " <td class=\"row-left\">\n" +
390
        " <td class=\"row-left\">\n" +
Lines 388-402 Link Here
388
        "  </small>\n" +
395
        "  </small>\n" +
389
        " </td>\n" +
396
        " </td>\n" +
390
        "</tr>\n";
397
        "</tr>\n";
391
398
392
    private static final String HOSTS_ROW_BUTTON_SECTION =
399
    private static final String HOSTS_ROW_BUTTON_SECTION =
393
        " <td class=\"row-left\">\n" +
400
        " <td class=\"row-left\" NOWRAP>\n" +
394
        "  <small>\n" +
401
        "  <small>\n" +
395
        "  &nbsp;<a href=\"{0}\" onclick=\"return(confirm('Are you sure?'))\">{1}</a>&nbsp;\n" +
402
        "  &nbsp;<a href=\"{0}\" onclick=\"return(confirm(''{1} {6}\\n\\nAre you sure?''))\">{1}</a>&nbsp;\n" +
396
        "  &nbsp;<a href=\"{2}\" onclick=\"return(confirm('Are you sure?'))\">{3}</a>&nbsp;\n" +
403
        "  &nbsp;<a href=\"{2}\" onclick=\"return(confirm(''{3} {6}\\n\\nAre you sure?''))\">{3}</a>&nbsp;\n" +
397
        "  &nbsp;<a href=\"{4}\" onclick=\"return(confirm('Are you sure?'))\">{5}</a>&nbsp;\n" +
404
        "  &nbsp;<a href=\"{4}\" onclick=\"return(confirm(''{5} {6}\\n\\nAre you sure?''))\">{5}</a>&nbsp;\n" +
398
        "  </small>\n" +
405
        "  </small>\n" +
399
        " </td>\n" +
406
        " </td>\n" +
400
        "</tr>\n";
407
        "</tr>\n";
401
408
402
    private static final String ADD_SECTION_START =
409
    private static final String ADD_SECTION_START =
Lines 452-462 Link Here
452
        "<tr>\n" +
459
        "<tr>\n" +
453
        " <td class=\"row-right\">\n" +
460
        " <td class=\"row-right\">\n" +
454
        "  &nbsp;\n" +
461
        "  &nbsp;\n" +
455
        " </td>\n" +
462
        " </td>\n" +
456
        " <td class=\"row-left\">\n" +
463
        " <td class=\"row-left\">\n" +
457
        "  <input type=\"hidden\" name=\"manager\" value=\"true\">\n" +
458
        "  <input type=\"submit\" value=\"{0}\">\n" +
464
        "  <input type=\"submit\" value=\"{0}\">\n" +
459
        " </td>\n" +
465
        " </td>\n" +
460
        "</tr>\n" +
466
        "</tr>\n" +
461
         "</table>\n" +
467
         "</table>\n" +
462
        "</form>\n" +
468
        "</form>\n" +
(-)apache-tomcat-5.5.15-src/container/webapps/host-manager/WEB-INF/classes/org/apache/catalina/hostmanager/LocalStrings.properties (-1 / +1 lines)
Lines 37-47 Link Here
37
htmlHostManagerServlet.addTitle=Add Virtual Host
37
htmlHostManagerServlet.addTitle=Add Virtual Host
38
htmlHostManagerServlet.addHost=Host
38
htmlHostManagerServlet.addHost=Host
39
htmlHostManagerServlet.addName=Name:
39
htmlHostManagerServlet.addName=Name:
40
htmlHostManagerServlet.addAliases=Aliases:
40
htmlHostManagerServlet.addAliases=Aliases:
41
htmlHostManagerServlet.addAppBase=App base:
41
htmlHostManagerServlet.addAppBase=App base:
42
htmlHostManagerServlet.addManager=Manager:
42
htmlHostManagerServlet.addManager=Manager App
43
htmlHostManagerServlet.addAutoDeploy=AutoDeploy
43
htmlHostManagerServlet.addAutoDeploy=AutoDeploy
44
htmlHostManagerServlet.addDeployOnStartup=DeployOnStartup
44
htmlHostManagerServlet.addDeployOnStartup=DeployOnStartup
45
htmlHostManagerServlet.addDeployXML=DeployXML
45
htmlHostManagerServlet.addDeployXML=DeployXML
46
htmlHostManagerServlet.addUnpackWARs=UnpackWARs
46
htmlHostManagerServlet.addUnpackWARs=UnpackWARs
47
htmlHostManagerServlet.addXmlNamespaceAware=XmlNamespaceAware
47
htmlHostManagerServlet.addXmlNamespaceAware=XmlNamespaceAware

Return to bug 38508