This is an automated email from the ASF dual-hosted git repository.
markt pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/9.0.x by this push:
new 577e567a71 Rework status manager fix
577e567a71 is described below
commit 577e567a71c4de3194a81c37d5ebf8b9ff74bd15
Author: Mark Thomas <[email protected]>
AuthorDate: Thu Nov 13 10:29:49 2025 +0000
Rework status manager fix
---
java/org/apache/catalina/manager/StatusTransformer.java | 4 ++++
webapps/docs/changelog.xml | 8 +++++++-
2 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/java/org/apache/catalina/manager/StatusTransformer.java
b/java/org/apache/catalina/manager/StatusTransformer.java
index 790a5eb0b4..adbc17c9b2 100644
--- a/java/org/apache/catalina/manager/StatusTransformer.java
+++ b/java/org/apache/catalina/manager/StatusTransformer.java
@@ -869,6 +869,8 @@ public class StatusTransformer {
writer.print("</a>");
writer.print("<p>");
+ writer.print("State: ");
+ writer.print(mBeanServer.getAttribute(objectName, "stateName"));
Object startTime = mBeanServer.getAttribute(objectName,
"startTime");
writer.print(" Start time: " + new Date(((Long)
startTime).longValue()));
writer.print(" Startup time: ");
@@ -895,6 +897,8 @@ public class StatusTransformer {
} else if (mode == 2) {
indent(writer, 2).append('{').println();
appendJSonValue(indent(writer, 3), "name",
JSONFilter.escape(JSONFilter.escape(name))).append(',');
+ appendJSonValue(writer, "state",
mBeanServer.getAttribute(objectName, "stateName"));
+ writer.append(',');
appendJSonValue(writer, "startTime",
new Date(((Long) mBeanServer.getAttribute(objectName,
"startTime")).longValue()).toString())
.append(',');
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 1ca168fe3e..dbeb4e04b7 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -136,8 +136,14 @@
<subsection name="Web Applications">
<changelog>
<fix>
- Fix error while building status JSON for a failed context. (schultz)
+ Manager: Fix abrupt truncation of the HTML and JSON complete server
+ status output if one or more of the web applications failed to start.
+ (schultz)
</fix>
+ <add>
+ Manager: Include web application state in the HTML and JSON complete
+ server status output. (markt)
+ </add>
</changelog>
</subsection>
</section>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]