Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configurable HTML subtitle in Manager web application #724

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions java/org/apache/catalina/manager/HTMLManagerServlet.java
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,10 @@ protected void list(HttpServletRequest request, HttpServletResponse response, St
Object[] args = new Object[2];
args[0] = getServletContext().getContextPath();
args[1] = smClient.getString("htmlManagerServlet.title");
String HTMLSubtitle = getServletContext().getInitParameter("HTMLSubtitle");
if (HTMLSubtitle != null) {
args[1] += "</font><br/><font size=\"+1\">" + HTMLSubtitle;
}

// HTML Header Section
writer.print(MessageFormat.format(Constants.HTML_HEADER_SECTION, args));
Expand Down
15 changes: 15 additions & 0 deletions webapps/docs/manager-howto.xml
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,21 @@ 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
<em>List Applications</em> page of Manager.</p>

<p>To customize the subtitle of the HTML interface of the Manager web application,
you can add any valid xml escaped html code to the <code>HTMLSubtitle</code>
parameter of the <code>Context</code>
</p>

<source><![CDATA[<Context privileged="true" ...>
...
<Parameter name="HTMLSubtitle"
value="Company Inc.&lt;br&gt;&lt;i style=&apos;color:red&apos;&gt;Staging&lt;/i&gt;"/>
</Context>]]></source>

<p>The above string value would unescape and be appended to the title</p>

<source><![CDATA[Company Inc.<br><i style='color:red'>Staging</i>]]></source>

</section>

<section name="Supported Manager Commands">
Expand Down