diff --git a/java/org/apache/catalina/manager/HTMLManagerServlet.java b/java/org/apache/catalina/manager/HTMLManagerServlet.java index d54f75454603..6a8f3ffcbe15 100644 --- a/java/org/apache/catalina/manager/HTMLManagerServlet.java +++ b/java/org/apache/catalina/manager/HTMLManagerServlet.java @@ -82,6 +82,7 @@ public final class HTMLManagerServlet extends ManagerServlet { static final String connectorTrustedCertsJspPath = "/WEB-INF/jsp/connectorTrustedCerts.jsp"; private boolean showProxySessions = false; + private String htmlSubTitle = null; // --------------------------------------------------------- Public Methods @@ -303,6 +304,9 @@ protected void list(HttpServletRequest request, HttpServletResponse response, St Object[] args = new Object[2]; args[0] = getServletContext().getContextPath(); args[1] = smClient.getString("htmlManagerServlet.title"); + if (htmlSubTitle != null) { + args[1] += "
" + htmlSubTitle; + } // HTML Header Section writer.print(MessageFormat.format(Constants.HTML_HEADER_SECTION, args)); @@ -737,6 +741,8 @@ public void init() throws ServletException { String value = null; value = getServletConfig().getInitParameter("showProxySessions"); showProxySessions = Boolean.parseBoolean(value); + + htmlSubTitle = getServletConfig().getInitParameter("htmlSubTitle"); } // ------------------------------------------------ Sessions administration diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml index 132a3ffb3c1c..8d5b6fc599fc 100644 --- a/webapps/docs/changelog.xml +++ b/webapps/docs/changelog.xml @@ -160,6 +160,16 @@ + + + + Add the ability to set a sub-title for the Manager web application main + page. This is intended to allow users with lots of instances to easily + distinguish them. Based on pull request 724 by Simon Arame. + (markt) + + + diff --git a/webapps/docs/manager-howto.xml b/webapps/docs/manager-howto.xml index f21ac584d3f5..f9678f415e4f 100644 --- a/webapps/docs/manager-howto.xml +++ b/webapps/docs/manager-howto.xml @@ -237,6 +237,25 @@ action does not have correct value of the token, the action will be denied. If the token has expired you can start again from the main page or List Applications page of Manager.

+

To customize the subtitle of the HTML interface of the Manager web application, +you can add any valid xml escaped html code to the htmlSubTitle +initialisation parameter of the HTMLManagerServlet +

+ + + HTMLManager + org.apache.catalina.manager.HTMLManagerServlet + + htmlSubTitle + Company Inc.<br><i style='color:red'>Staging</i> + + ... +]]> + +

The above string value would unescape and be appended to the title

+ +Staging]]> +
diff --git a/webapps/manager/WEB-INF/web.xml b/webapps/manager/WEB-INF/web.xml index a5332d59d887..ae8aeb9e4f8e 100644 --- a/webapps/manager/WEB-INF/web.xml +++ b/webapps/manager/WEB-INF/web.xml @@ -52,6 +52,13 @@ true --> + 52428800