This is an automated email from the ASF dual-hosted git repository.
markt-asf 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 1097cb6e33 Complete changes required for ".war" extension to be case
insensitive
1097cb6e33 is described below
commit 1097cb6e33f586b9cd5ee9a660b245e2c774b657
Author: Mark Thomas <[email protected]>
AuthorDate: Wed Jun 24 18:32:35 2026 +0100
Complete changes required for ".war" extension to be case insensitive
(within the context of the WarFarmDeployer)
---
java/org/apache/catalina/ha/deploy/FarmWarDeployer.java | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/java/org/apache/catalina/ha/deploy/FarmWarDeployer.java
b/java/org/apache/catalina/ha/deploy/FarmWarDeployer.java
index d5ad9c45cc..3c051fb646 100644
--- a/java/org/apache/catalina/ha/deploy/FarmWarDeployer.java
+++ b/java/org/apache/catalina/ha/deploy/FarmWarDeployer.java
@@ -229,7 +229,7 @@ public class FarmWarDeployer extends ClusterListener
implements ClusterDeployer,
// last message received war file is completed
String name = factory.getFile().getName();
if (!name.endsWith(".war")) {
- name = name + ".war";
+ name = (new ContextName(name, true)).getBaseName() +
".war";
}
File deployable = new File(getDeployDirFile(), name);
try {
@@ -419,8 +419,9 @@ public class FarmWarDeployer extends ClusterListener
implements ClusterDeployer,
@Override
public void fileModified(File newWar) {
try {
- File deployWar = new File(getDeployDirFile(), newWar.getName());
- ContextName cn = new ContextName(deployWar.getName(), true);
+ ContextName cn = new ContextName(newWar.getName(), true);
+ // Ensure deployed war uses lower case ".war" extension
+ File deployWar = new File(getDeployDirFile(), cn.getBaseName() +
".war");
if (deployWar.exists() && deployWar.lastModified() >
newWar.lastModified()) {
if (log.isInfoEnabled()) {
log.info(sm.getString("farmWarDeployer.alreadyDeployed",
cn.getName()));
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]