tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject cvs commit: jakarta-tomcat-catalina/webapps/manager/WEB-INF/classes/org/apache/catalina/manager Constants.java HTMLManagerServlet.java LocalStrings.properties LocalStrings_fr.properties StatusManagerServlet.java
Date Mon, 28 Jul 2003 14:57:48 GMT
remm        2003/07/28 07:57:48

  Modified:    webapps/manager/WEB-INF/classes/org/apache/catalina/manager
                        Constants.java HTMLManagerServlet.java
                        LocalStrings.properties LocalStrings_fr.properties
                        StatusManagerServlet.java
  Log:
  - Beautify the status servlet, and integrate it with the HTML manager, through
    links.
  - Note: For programmatic access, I recommend not trying to hack the status
    output, but rather look into JSR 160 (http://www.jcp.org/en/jsr/detail?id=160).
    This JSR could possibly be finalized by the time TC 5 ships, so it's IMO the
    preffered solution.
  
  Revision  Changes    Path
  1.2       +155 -3    jakarta-tomcat-catalina/webapps/manager/WEB-INF/classes/org/apache/catalina/manager/Constants.java
  
  Index: Constants.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/manager/WEB-INF/classes/org/apache/catalina/manager/Constants.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Constants.java	26 Mar 2003 09:49:18 -0000	1.1
  +++ Constants.java	28 Jul 2003 14:57:47 -0000	1.2
  @@ -69,5 +69,157 @@
   
       public static final String Package = "org.apache.catalina.manager";
   
  +    public static final String HTML_HEADER_SECTION =
  +        "<html>\n" +
  +        "<head>\n" +
  +        "<style>\n" +
  +        "  table { width: 100%; }\n" +
  +        "  td.page-title {\n" +
  +        "    text-align: center;\n" +
  +        "    vertical-align: top;\n" +
  +        "    font-family:verdana,sans-serif;\n" +
  +        "    font-weight: bold;\n" +
  +        "    background: white;\n" +
  +        "    color: black;\n" +
  +        "  }\n" +
  +        "  td.title {\n" +
  +        "    text-align: left;\n" +
  +        "    vertical-align: top;\n" +
  +        "    font-family:verdana,sans-serif;\n" +
  +        "    font-style:italic;\n" +
  +        "    font-weight: bold;\n" +
  +        "    background: #D2A41C;\n" +
  +        "  }\n" +
  +        "  td.header-left {\n" +
  +        "    text-align: left;\n" +
  +        "    vertical-align: top;\n" +
  +        "    font-family:verdana,sans-serif;\n" +
  +        "    font-weight: bold;\n" +
  +        "    background: #FFDC75;\n" +
  +        "  }\n" +
  +        "  td.header-center {\n" +
  +        "    text-align: center;\n" +
  +        "    vertical-align: top;\n" +
  +        "    font-family:verdana,sans-serif;\n" +
  +        "    font-weight: bold;\n" +
  +        "    background: #FFDC75;\n" +
  +        "  }\n" +
  +        "  td.row-left {\n" +
  +        "    text-align: left;\n" +
  +        "    vertical-align: middle;\n" +
  +        "    font-family:verdana,sans-serif;\n" +
  +        "    color: black;\n" +
  +        "    background: white;\n" +
  +        "  }\n" +
  +        "  td.row-center {\n" +
  +        "    text-align: center;\n" +
  +        "    vertical-align: middle;\n" +
  +        "    font-family:verdana,sans-serif;\n" +
  +        "    color: black;\n" +
  +        "    background: white;\n" +
  +        "  }\n" +
  +        "  td.row-right {\n" +
  +        "    text-align: right;\n" +
  +        "    vertical-align: middle;\n" +
  +        "    font-family:verdana,sans-serif;\n" +
  +        "    color: black;\n" +
  +        "    background: white;\n" +
  +        "  }\n" +
  +        "</style>\n";
  +
  +    public static final String BODY_HEADER_SECTION =
  +        "<title>{0}</title>\n" +
  +        "</head>\n" +
  +        "\n" +
  +        "<body bgcolor=\"#FFFFFF\">\n" +
  +        "\n" +
  +        "<table cellspacing=\"4\" width=\"100%\" border=\"0\">\n" +
  +        " <tr>\n" +
  +        "  <td colspan=\"2\">\n" +
  +        "   <a href=\"http://jakarta.apache.org/\">\n" +
  +        "    <img border=\"0\" alt=\"The Jakarta Project\" align=\"left\"\n" +
  +        "         src=\"{0}/images/jakarta-logo.gif\">\n" +
  +        "   </a>\n" +
  +        "   <a href=\"http://jakarta.apache.org/tomcat/\">\n" +
  +        "    <img border=\"0\" alt=\"The Tomcat Servlet/JSP Container\"\n" +
  +        "         align=\"right\" src=\"{0}/images/tomcat.gif\">\n" +
  +        "   </a>\n" +
  +        "  </td>\n" +
  +        " </tr>\n" +
  +        "</table>\n" +
  +        "<hr size=\"1\" noshade\"\">\n" +
  +        "<table cellspacing=\"4\" width=\"100%\" border=\"0\">\n" +
  +        " <tr>\n" +
  +        "  <td class=\"page-title\" bordercolor=\"#000000\" " +
  +        "align=\"left\" nowrap>\n" +
  +        "   <font size=\"+2\">{1}</font>\n" +
  +        "  </td>\n" +
  +        " </tr>\n" +
  +        "</table>\n" +
  +        "<br>\n" +
  +        "\n";
  +
  +    public static final String MESSAGE_SECTION =
  +        "<table border=\"1\" cellspacing=\"0\" cellpadding=\"3\">\n" +
  +        " <tr>\n" +
  +        "  <td class=\"row-left\" width=\"10%\">" +
  +        "<small><b>{0}</b></small>&nbsp;</td>\n" +
  +        "  <td class=\"row-left\"><pre>{1}</pre></td>\n" +
  +        " </tr>\n" +
  +        "</table>\n" +
  +        "<br>\n" +
  +        "\n";
  +
  +    public static final String MANAGER_SECTION =
  +        "<table border=\"1\" cellspacing=\"0\" cellpadding=\"3\">\n" +
  +        "<tr>\n" +
  +        " <td colspan=\"4\" class=\"title\">{0}</td>\n" +
  +        "</tr>\n" +
  +        " <tr>\n" +
  +        "  <td class=\"row-left\"><a href=\"{1}\">{2}</a></td>\n"
+
  +        "  <td class=\"row-center\"><a href=\"{3}\">{4}</a></td>\n"
+
  +        "  <td class=\"row-center\"><a href=\"{5}\">{6}</a></td>\n"
+
  +        "  <td class=\"row-right\"><a href=\"{7}\">{8}</a></td>\n"
+
  +        " </tr>\n" +
  +        "</table>\n" +
  +        "<br>\n" +
  +        "\n";
  +
  +    public static final String SERVER_HEADER_SECTION =
  +        "<table border=\"1\" cellspacing=\"0\" cellpadding=\"3\">\n" +
  +        "<tr>\n" +
  +        " <td colspan=\"6\" class=\"title\">{0}</td>\n" +
  +        "</tr>\n" +
  +        "<tr>\n" +
  +        " <td class=\"header-center\"><small>{1}</small></td>\n"
+
  +        " <td class=\"header-center\"><small>{2}</small></td>\n"
+
  +        " <td class=\"header-center\"><small>{3}</small></td>\n"
+
  +        " <td class=\"header-center\"><small>{4}</small></td>\n"
+
  +        " <td class=\"header-center\"><small>{5}</small></td>\n"
+
  +        " <td class=\"header-center\"><small>{6}</small></td>\n"
+
  +        "</tr>\n";
  +
  +    public static final String SERVER_ROW_SECTION =
  +        "<tr>\n" +
  +        " <td class=\"row-center\"><small>{0}</small></td>\n" +
  +        " <td class=\"row-center\"><small>{1}</small></td>\n" +
  +        " <td class=\"row-center\"><small>{2}</small></td>\n" +
  +        " <td class=\"row-center\"><small>{3}</small></td>\n" +
  +        " <td class=\"row-center\"><small>{4}</small></td>\n" +
  +        " <td class=\"row-center\"><small>{5}</small></td>\n" +
  +        "</tr>\n" +
  +        "</table>\n" +
  +        "<br>\n" +
  +        "\n";
  +
  +    public static final String HTML_TAIL_SECTION =
  +        "<hr size=\"1\" noshade\"\">\n" +
  +        "<center><font size=\"-1\" color=\"#525D76\">\n" +
  +        " <em>Copyright &copy; 1999-2003, Apache Software Foundation</em>"
+
  +        "</font></center>\n" +
  +        "\n" +
  +        "</body>\n" +
  +        "</html>";
  +
   }
   
  
  
  
  1.7       +17 -162   jakarta-tomcat-catalina/webapps/manager/WEB-INF/classes/org/apache/catalina/manager/HTMLManagerServlet.java
  
  Index: HTMLManagerServlet.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/manager/WEB-INF/classes/org/apache/catalina/manager/HTMLManagerServlet.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- HTMLManagerServlet.java	25 Jul 2003 16:41:46 -0000	1.6
  +++ HTMLManagerServlet.java	28 Jul 2003 14:57:47 -0000	1.7
  @@ -347,22 +347,23 @@
           PrintWriter writer = response.getWriter();
   
           // HTML Header Section
  -        writer.print(HTML_HEADER_SECTION);
  +        writer.print(Constants.HTML_HEADER_SECTION);
   
           // Body Header Section
           Object[] args = new Object[2];
           args[0] = request.getContextPath();
           args[1] = sm.getString("htmlManagerServlet.title");
  -        writer.print(MessageFormat.format(BODY_HEADER_SECTION, args));
  +        writer.print(MessageFormat.format
  +                     (Constants.BODY_HEADER_SECTION, args));
   
           // Message Section
           args = new Object[3];
           args[0] = sm.getString("htmlManagerServlet.messageLabel");
           args[1] = (message == null || message.length() == 0) ? "OK" : message;
  -        writer.print(MessageFormat.format(MESSAGE_SECTION, args));
  +        writer.print(MessageFormat.format(Constants.MESSAGE_SECTION, args));
   
           // Manager Section
  -        args = new Object[7];
  +        args = new Object[9];
           args[0] = sm.getString("htmlManagerServlet.manager");
           args[1] = response.encodeURL(request.getContextPath() + "/html/list");
           args[2] = sm.getString("htmlManagerServlet.list");
  @@ -374,7 +375,10 @@
               (request.getContextPath() + "/" +
                sm.getString("htmlManagerServlet.helpManagerFile"));
           args[6] = sm.getString("htmlManagerServlet.helpManager");
  -        writer.print(MessageFormat.format(MANAGER_SECTION, args));
  +        args[7] = response.encodeURL
  +            (request.getContextPath() + "/status");
  +        args[8] = sm.getString("statusServlet.title");
  +        writer.print(MessageFormat.format(Constants.MANAGER_SECTION, args));
   
           // Apps Header Section
           args = new Object[6];
  @@ -486,7 +490,8 @@
           args[4] = sm.getString("htmlManagerServlet.serverOSName");
           args[5] = sm.getString("htmlManagerServlet.serverOSVersion");
           args[6] = sm.getString("htmlManagerServlet.serverOSArch");
  -        writer.print(MessageFormat.format(SERVER_HEADER_SECTION, args));
  +        writer.print(MessageFormat.format
  +                     (Constants.SERVER_HEADER_SECTION, args));
   
           // Server Row Section
           args = new Object[6];
  @@ -496,10 +501,10 @@
           args[3] = System.getProperty("os.name");
           args[4] = System.getProperty("os.version");
           args[5] = System.getProperty("os.arch");
  -        writer.print(MessageFormat.format(SERVER_ROW_SECTION, args));
  +        writer.print(MessageFormat.format(Constants.SERVER_ROW_SECTION, args));
   
           // HTML Tail Section
  -        writer.print(HTML_TAIL_SECTION);
  +        writer.print(Constants.HTML_TAIL_SECTION);
   
           // Finish up the response
           writer.flush();
  @@ -602,121 +607,6 @@
       // limited number of subsitutions MessageFormat can process
       // (maximium of 10).
   
  -    private static final String HTML_HEADER_SECTION =
  -        "<html>\n" +
  -        "<head>\n" +
  -        "<style>\n" +
  -        "  table { width: 100%; }\n" +
  -        "  td.page-title {\n" +
  -        "    text-align: center;\n" +
  -        "    vertical-align: top;\n" +
  -        "    font-family:verdana,sans-serif;\n" +
  -        "    font-weight: bold;\n" +
  -        "    background: white;\n" +
  -        "    color: black;\n" +
  -        "  }\n" +
  -        "  td.title {\n" +
  -        "    text-align: left;\n" +
  -        "    vertical-align: top;\n" +
  -        "    font-family:verdana,sans-serif;\n" +
  -        "    font-style:italic;\n" +
  -        "    font-weight: bold;\n" +
  -        "    background: #D2A41C;\n" +
  -        "  }\n" +
  -        "  td.header-left {\n" +
  -        "    text-align: left;\n" +
  -        "    vertical-align: top;\n" +
  -        "    font-family:verdana,sans-serif;\n" +
  -        "    font-weight: bold;\n" +
  -        "    background: #FFDC75;\n" +
  -        "  }\n" +
  -        "  td.header-center {\n" +
  -        "    text-align: center;\n" +
  -        "    vertical-align: top;\n" +
  -        "    font-family:verdana,sans-serif;\n" +
  -        "    font-weight: bold;\n" +
  -        "    background: #FFDC75;\n" +
  -        "  }\n" +
  -        "  td.row-left {\n" +
  -        "    text-align: left;\n" +
  -        "    vertical-align: middle;\n" +
  -        "    font-family:verdana,sans-serif;\n" +
  -        "    color: black;\n" +
  -        "    background: white;\n" +
  -        "  }\n" +
  -        "  td.row-center {\n" +
  -        "    text-align: center;\n" +
  -        "    vertical-align: middle;\n" +
  -        "    font-family:verdana,sans-serif;\n" +
  -        "    color: black;\n" +
  -        "    background: white;\n" +
  -        "  }\n" +
  -        "  td.row-right {\n" +
  -        "    text-align: right;\n" +
  -        "    vertical-align: middle;\n" +
  -        "    font-family:verdana,sans-serif;\n" +
  -        "    color: black;\n" +
  -        "    background: white;\n" +
  -        "  }\n" +
  -        "</style>\n";
  -
  -    private static final String BODY_HEADER_SECTION =
  -        "<title>{0}</title>\n" +
  -        "</head>\n" +
  -        "\n" +
  -        "<body bgcolor=\"#FFFFFF\">\n" +
  -        "\n" +
  -        "<table cellspacing=\"4\" width=\"100%\" border=\"0\">\n" +
  -        " <tr>\n" +
  -        "  <td colspan=\"2\">\n" +
  -        "   <a href=\"http://jakarta.apache.org/\">\n" +
  -        "    <img border=\"0\" alt=\"The Jakarta Project\" align=\"left\"\n" +
  -        "         src=\"{0}/images/jakarta-logo.gif\">\n" +
  -        "   </a>\n" +
  -        "   <a href=\"http://jakarta.apache.org/tomcat/\">\n" +
  -        "    <img border=\"0\" alt=\"The Tomcat Servlet/JSP Container\"\n" +
  -        "         align=\"right\" src=\"{0}/images/tomcat.gif\">\n" +
  -        "   </a>\n" +
  -        "  </td>\n" +
  -        " </tr>\n" +
  -        "</table>\n" +
  -        "<hr size=\"1\" noshade\"\">\n" +
  -        "<table cellspacing=\"4\" width=\"100%\" border=\"0\">\n" +
  -        " <tr>\n" +
  -        "  <td class=\"page-title\" bordercolor=\"#000000\" " +
  -        "align=\"left\" nowrap>\n" +
  -        "   <font size=\"+2\">{1}</font>\n" +
  -        "  </td>\n" +
  -        " </tr>\n" +
  -        "</table>\n" +
  -        "<br>\n" +
  -        "\n";
  -
  -    private static final String MESSAGE_SECTION =
  -        "<table border=\"1\" cellspacing=\"0\" cellpadding=\"3\">\n" +
  -        " <tr>\n" +
  -        "  <td class=\"row-left\" width=\"10%\">" +
  -        "<small><b>{0}</b></small>&nbsp;</td>\n" +
  -        "  <td class=\"row-left\"><pre>{1}</pre></td>\n" +
  -        " </tr>\n" +
  -        "</table>\n" +
  -        "<br>\n" +
  -        "\n";
  -
  -    private static final String MANAGER_SECTION =
  -        "<table border=\"1\" cellspacing=\"0\" cellpadding=\"3\">\n" +
  -        "<tr>\n" +
  -        " <td colspan=\"3\" class=\"title\">{0}</td>\n" +
  -        "</tr>\n" +
  -        " <tr>\n" +
  -        "  <td class=\"row-left\"><a href=\"{1}\">{2}</a></td>\n"
+
  -        "  <td class=\"row-center\"><a href=\"{3}\">{4}</a></td>\n"
+
  -        "  <td class=\"row-right\"><a href=\"{5}\">{6}</a></td>\n"
+
  -        " </tr>\n" +
  -        "</table>\n" +
  -        "<br>\n" +
  -        "\n";
  -
       private static final String APPS_HEADER_SECTION =
           "<table border=\"1\" cellspacing=\"0\" cellpadding=\"3\">\n" +
           "<tr>\n" +
  @@ -854,39 +744,4 @@
           "<br>\n" +
           "\n";
   
  -    private static final String SERVER_HEADER_SECTION =
  -        "<table border=\"1\" cellspacing=\"0\" cellpadding=\"3\">\n" +
  -        "<tr>\n" +
  -        " <td colspan=\"6\" class=\"title\">{0}</td>\n" +
  -        "</tr>\n" +
  -        "<tr>\n" +
  -        " <td class=\"header-center\"><small>{1}</small></td>\n"
+
  -        " <td class=\"header-center\"><small>{2}</small></td>\n"
+
  -        " <td class=\"header-center\"><small>{3}</small></td>\n"
+
  -        " <td class=\"header-center\"><small>{4}</small></td>\n"
+
  -        " <td class=\"header-center\"><small>{5}</small></td>\n"
+
  -        " <td class=\"header-center\"><small>{6}</small></td>\n"
+
  -        "</tr>\n";
  -
  -    private static final String SERVER_ROW_SECTION =
  -        "<tr>\n" +
  -        " <td class=\"row-center\"><small>{0}</small></td>\n" +
  -        " <td class=\"row-center\"><small>{1}</small></td>\n" +
  -        " <td class=\"row-center\"><small>{2}</small></td>\n" +
  -        " <td class=\"row-center\"><small>{3}</small></td>\n" +
  -        " <td class=\"row-center\"><small>{4}</small></td>\n" +
  -        " <td class=\"row-center\"><small>{5}</small></td>\n" +
  -        "</tr>\n" +
  -        "</table>\n" +
  -        "<br>\n" +
  -        "\n";
  -
  -    private static final String HTML_TAIL_SECTION =
  -        "<hr size=\"1\" noshade\"\">\n" +
  -        "<center><font size=\"-1\" color=\"#525D76\">\n" +
  -        " <em>Copyright &copy; 1999-2002, Apache Software Foundation</em>"
+
  -        "</font></center>\n" +
  -        "\n" +
  -        "</body>\n" +
  -        "</html>";
   }
  
  
  
  1.3       +2 -0      jakarta-tomcat-catalina/webapps/manager/WEB-INF/classes/org/apache/catalina/manager/LocalStrings.properties
  
  Index: LocalStrings.properties
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/manager/WEB-INF/classes/org/apache/catalina/manager/LocalStrings.properties,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- LocalStrings.properties	15 Jun 2003 18:31:45 -0000	1.2
  +++ LocalStrings.properties	28 Jul 2003 14:57:47 -0000	1.3
  @@ -74,3 +74,5 @@
   managerServlet.userDatabaseError=FAIL - Cannot resolve user database reference
   managerServlet.userDatabaseMissing=FAIL - No user database is available
   
  +statusServlet.title=Server Status
  +statusServlet.complete=Complete Server Status
  
  
  
  1.2       +3 -0      jakarta-tomcat-catalina/webapps/manager/WEB-INF/classes/org/apache/catalina/manager/LocalStrings_fr.properties
  
  Index: LocalStrings_fr.properties
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/manager/WEB-INF/classes/org/apache/catalina/manager/LocalStrings_fr.properties,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- LocalStrings_fr.properties	26 Mar 2003 09:49:19 -0000	1.1
  +++ LocalStrings_fr.properties	28 Jul 2003 14:57:47 -0000	1.2
  @@ -59,3 +59,6 @@
   managerServlet.unknownCommand=ECHEC - Commande inconnue {0}
   managerServlet.userDatabaseError=ECHEC - Impossible de résoudre la base de données utilisateurs
deréférence
   managerServlet.userDatabaseMissing=ECHEC - Aucune base de données utilisateurs n''est disponible
  +
  +statusServlet.title=Etat du serveur
  +statusServlet.complete=Etat complet du serveur
  
  
  
  1.5       +84 -4     jakarta-tomcat-catalina/webapps/manager/WEB-INF/classes/org/apache/catalina/manager/StatusManagerServlet.java
  
  Index: StatusManagerServlet.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/manager/WEB-INF/classes/org/apache/catalina/manager/StatusManagerServlet.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- StatusManagerServlet.java	28 Jul 2003 14:11:08 -0000	1.4
  +++ StatusManagerServlet.java	28 Jul 2003 14:57:47 -0000	1.5
  @@ -67,6 +67,7 @@
   
   import java.io.IOException;
   import java.io.PrintWriter;
  +import java.text.MessageFormat;
   import java.util.Enumeration;
   import java.util.Iterator;
   import java.util.Set;
  @@ -89,6 +90,9 @@
   
   import org.apache.tomcat.util.compat.JdkCompat;
   
  +import org.apache.catalina.util.ServerInfo;
  +import org.apache.catalina.util.StringManager;
  +
   /**
    * This servlet will display a complete status of the HTTP/1.1 connector.
    *
  @@ -139,6 +143,13 @@
       protected Vector globalRequestProcessors = new Vector();
   
   
  +    /**
  +     * The string manager for this package.
  +     */
  +    protected static StringManager sm =
  +        StringManager.getManager(Constants.Package);
  +
  +
       // --------------------------------------------------------- Public Methods
   
   
  @@ -240,6 +251,72 @@
   
           PrintWriter writer = response.getWriter();
   
  +        boolean completeStatus = false;
  +        if ((request.getPathInfo() != null) 
  +            && (request.getPathInfo().equals("/all"))) {
  +            completeStatus = true;
  +        }
  +
  +        // HTML Header Section
  +        writer.print(Constants.HTML_HEADER_SECTION);
  +
  +        // Body Header Section
  +        Object[] args = new Object[2];
  +        args[0] = request.getContextPath();
  +        if (completeStatus) {
  +            args[1] = sm.getString("statusServlet.complete");
  +        } else {
  +            args[1] = sm.getString("statusServlet.title");
  +        }
  +        writer.print(MessageFormat.format
  +                     (Constants.BODY_HEADER_SECTION, args));
  +
  +        // Manager Section
  +        args = new Object[9];
  +        args[0] = sm.getString("htmlManagerServlet.manager");
  +        args[1] = response.encodeURL(request.getContextPath() + "/html/list");
  +        args[2] = sm.getString("htmlManagerServlet.list");
  +        args[3] = response.encodeURL
  +            (request.getContextPath() + "/" +
  +             sm.getString("htmlManagerServlet.helpHtmlManagerFile"));
  +        args[4] = sm.getString("htmlManagerServlet.helpHtmlManager");
  +        args[5] = response.encodeURL
  +            (request.getContextPath() + "/" +
  +             sm.getString("htmlManagerServlet.helpManagerFile"));
  +        args[6] = sm.getString("htmlManagerServlet.helpManager");
  +        if (completeStatus) {
  +            args[7] = response.encodeURL
  +                (request.getContextPath() + "/status");
  +            args[8] = sm.getString("statusServlet.title");
  +        } else {
  +            args[7] = response.encodeURL
  +                (request.getContextPath() + "/status/all");
  +            args[8] = sm.getString("statusServlet.complete");
  +        }
  +        writer.print(MessageFormat.format(Constants.MANAGER_SECTION, args));
  +
  +        // Server Header Section
  +        args = new Object[7];
  +        args[0] = sm.getString("htmlManagerServlet.serverTitle");
  +        args[1] = sm.getString("htmlManagerServlet.serverVersion");
  +        args[2] = sm.getString("htmlManagerServlet.serverJVMVersion");
  +        args[3] = sm.getString("htmlManagerServlet.serverJVMVendor");
  +        args[4] = sm.getString("htmlManagerServlet.serverOSName");
  +        args[5] = sm.getString("htmlManagerServlet.serverOSVersion");
  +        args[6] = sm.getString("htmlManagerServlet.serverOSArch");
  +        writer.print(MessageFormat.format
  +                     (Constants.SERVER_HEADER_SECTION, args));
  +
  +        // Server Row Section
  +        args = new Object[6];
  +        args[0] = ServerInfo.getServerInfo();
  +        args[1] = System.getProperty("java.runtime.version");
  +        args[2] = System.getProperty("java.vm.vendor");
  +        args[3] = System.getProperty("os.name");
  +        args[4] = System.getProperty("os.version");
  +        args[5] = System.getProperty("os.arch");
  +        writer.print(MessageFormat.format(Constants.SERVER_ROW_SECTION, args));
  +
           try {
   
               // Display virtual machine statistics
  @@ -261,6 +338,9 @@
           } catch (Exception e) {
               e.printStackTrace();
           }
  +
  +        // HTML Tail Section
  +        writer.print(Constants.HTML_TAIL_SECTION);
   
       }
   
  
  
  

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


Mime
View raw message