This is an automated email from the ASF dual-hosted git repository.

rmaucher pushed a commit to branch 11.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit 02a4685bd89a4b85b7ac88997e40e9979bf64e03
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 5457c0b035..da61f6fc68 100644
--- a/java/org/apache/jasper/compiler/JspConfig.java
+++ b/java/org/apache/jasper/compiler/JspConfig.java
@@ -393,7 +393,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]

Reply via email to