This is an automated email from the ASF dual-hosted git repository. rmaucher pushed a commit to branch 9.0.x in repository https://gitbox.apache.org/repos/asf/tomcat.git
commit 894f61726fe51df5d05ea3150be1aeed9a2ff88b Author: opencode <[email protected]> AuthorDate: Sun Oct 18 21:26:52 2026 +0200 Match JSP pages in sub-directories in JspConfig.isJspPage JspConfig.isJspPage(), used by jspc when scanning a web application for pages to process, compared the directory prefix of a jsp-property-group URL pattern with equals() against the page path, while the matcher used at runtime, findJspProperty(), uses startsWith(). Pages in directories below the one named by a path-prefix pattern such as /p/* were therefore silently skipped by jspc even though the container processes them as JSP pages. Match the prefix with startsWith() so the scan covers the same pages that the container's runtime matching selects. --- java/org/apache/jasper/compiler/JspConfig.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/org/apache/jasper/compiler/JspConfig.java b/java/org/apache/jasper/compiler/JspConfig.java index 6c56fc06eb..127353ab8a 100644 --- a/java/org/apache/jasper/compiler/JspConfig.java +++ b/java/org/apache/jasper/compiler/JspConfig.java @@ -383,7 +383,7 @@ public class JspConfig { return true; } } else { - if ((path == null || path.equals(uriPath)) && + if ((path == null || (uriPath != null && uriPath.startsWith(path))) && (extension.equals("*") || extension.equals(uriExtension))) { // Matches *, *.ext, /p/*, or /p/*.ext return true; --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
