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

robertlazarski pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/axis-axis2-java-core.git

commit 6a8e8c9baa62ad2111a6799ae776e3ffac5408eb
Author: Robert Lazarski <[email protected]>
AuthorDate: Fri May 15 10:07:07 2026 -1000

    Fix AnonRequestMatcher for context root prefix (WildFly)
    
    The matcher used equalsIgnoreCase("/services/loginService") which
    fails on WildFly where the URI includes the context root:
    /axis2-json-api/services/loginService. Changed to endsWith() +
    contains() to handle any context root.
    
    Also includes the Merton params in monteCarlo mcpInputSchema.
    
    Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
---
 .../src/main/java/userguide/springboot/Axis2Application.java  | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git 
a/modules/samples/userguide/src/userguide/springbootdemo-tomcat11/src/main/java/userguide/springboot/Axis2Application.java
 
b/modules/samples/userguide/src/userguide/springbootdemo-tomcat11/src/main/java/userguide/springboot/Axis2Application.java
index e197e29416..19b21620de 100644
--- 
a/modules/samples/userguide/src/userguide/springbootdemo-tomcat11/src/main/java/userguide/springboot/Axis2Application.java
+++ 
b/modules/samples/userguide/src/userguide/springbootdemo-tomcat11/src/main/java/userguide/springboot/Axis2Application.java
@@ -123,11 +123,14 @@ public class Axis2Application extends 
SpringBootServletInitializer {
 
             @Override
             public boolean matches(HttpServletRequest request) {
-                String uri = request.getRequestURI();
-                boolean result = uri.equalsIgnoreCase("/services/loginService")
-                        || 
uri.toLowerCase(java.util.Locale.ROOT).startsWith("/services/loginservice/");
+                // Match loginService regardless of context root prefix.
+                // Embedded Tomcat: /services/loginService
+                // WildFly: /axis2-json-api/services/loginService
+                String uriLower = 
request.getRequestURI().toLowerCase(java.util.Locale.ROOT);
+                boolean result = uriLower.endsWith("/services/loginservice")
+                        || uriLower.endsWith("/services/loginservice/");
                 if (logger.isDebugEnabled()) {
-                    String safeUri = uri.replaceAll("[\\r\\n]", "_");
+                    String safeUri = uriLower.replaceAll("[\\r\\n]", "_");
                     logger.debug("AnonRequestMatcher.matches , result: "
                             + result + " , uri: " + safeUri
                             + " , method: " + request.getMethod());

Reply via email to