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 3cab684cdff914390b10e70274a76d5f62f3f231
Author: Robert Lazarski <[email protected]>
AuthorDate: Mon Apr 6 02:20:18 2026 -1000

    springbootdemo-tomcat11: fix deploy directory name — axis2-json-api not 
axis2-json-api.war
    
    When Tomcat deploys a directory named 'foo.war', it strips '.war' from WAR
    FILES but NOT from directories — context path is '/axis2-json-api.war', not
    '/axis2-json-api'. This caused all /axis2-json-api/* requests to be handled
    by the ROOT context (which ran old code without the OpenAPI bypass), not by
    the new app with OpenApiServlet.
    
    Rename target/deploy/axis2-json-api.war to target/deploy/axis2-json-api in
    all pom.xml antrun and maven-war-plugin webappDirectory references so the
    deployed directory creates context path /axis2-json-api as intended.
    
    Tested on Tomcat 11.0.20 + OpenJDK 21: /openapi.json, /openapi.yaml,
    /swagger-ui all return 200; login returns Bearer token; testws protected
    service returns OK with XSS-escaped output.
    
    Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
---
 .../src/userguide/springbootdemo-tomcat11/pom.xml        | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git 
a/modules/samples/userguide/src/userguide/springbootdemo-tomcat11/pom.xml 
b/modules/samples/userguide/src/userguide/springbootdemo-tomcat11/pom.xml
index b0e92811fe..614a1aa0dc 100644
--- a/modules/samples/userguide/src/userguide/springbootdemo-tomcat11/pom.xml
+++ b/modules/samples/userguide/src/userguide/springbootdemo-tomcat11/pom.xml
@@ -334,7 +334,7 @@
                                     <version>0.0.1-SNAPSHOT</version>
                                     <type>war</type>
                                     <overWrite>false</overWrite>
-                                    
<outputDirectory>${project.build.directory}/deploy/axis2-json-api.war</outputDirectory>
+                                    
<outputDirectory>${project.build.directory}/deploy/axis2-json-api</outputDirectory>
                                     <includes>**/*.class,**/*.xml</includes>
                                     <excludes>**/*test.class</excludes>
                                 </artifactItem>
@@ -357,23 +357,23 @@
                         <phase>prepare-package</phase>
                         <configuration>
                             <target>
-                                <jar 
jarfile="${project.build.directory}/deploy/axis2-json-api.war/WEB-INF/services/Login.aar">
+                                <jar 
jarfile="${project.build.directory}/deploy/axis2-json-api/WEB-INF/services/Login.aar">
                                     <metainf 
file="resources-axis2/login_resources/services.xml"/>
                                 </jar>
-                                <jar 
jarfile="${project.build.directory}/deploy/axis2-json-api.war/WEB-INF/services/testws.aar">
+                                <jar 
jarfile="${project.build.directory}/deploy/axis2-json-api/WEB-INF/services/testws.aar">
                                     <metainf 
file="resources-axis2/test_service_resources/services.xml"/>
                                 </jar>
-                                <jar 
jarfile="${project.build.directory}/deploy/axis2-json-api.war/WEB-INF/services/BigDataH2Service.aar">
+                                <jar 
jarfile="${project.build.directory}/deploy/axis2-json-api/WEB-INF/services/BigDataH2Service.aar">
                                     <metainf 
file="resources-axis2/bigdata_h2_resources/services.xml"/>
                                 </jar>
-                                <copy 
todir="${project.build.directory}/deploy/axis2-json-api.war/WEB-INF/conf">
+                                <copy 
todir="${project.build.directory}/deploy/axis2-json-api/WEB-INF/conf">
                                     <fileset dir="resources-axis2/conf">
                                         <include name="axis2.xml"/>
                                     </fileset>
                                 </copy>
-                                <mkdir 
dir="${project.build.directory}/deploy/axis2-json-api.war/WEB-INF/modules"/>
+                                <mkdir 
dir="${project.build.directory}/deploy/axis2-json-api/WEB-INF/modules"/>
                                 <copy 
file="${settings.localRepository}/org/apache/axis2/axis2-openapi/${axis2.version}/axis2-openapi-${axis2.version}.jar"
-                                      
tofile="${project.build.directory}/deploy/axis2-json-api.war/WEB-INF/modules/openapi-${axis2.version}.mar"
+                                      
tofile="${project.build.directory}/deploy/axis2-json-api/WEB-INF/modules/openapi-${axis2.version}.mar"
                                       overwrite="true"/>
                                 <unzip 
src="${project.build.directory}/axis2-json-api-0.0.1-SNAPSHOT.war" 
dest="${project.build.directory}/exploded"/>
                                 <jar 
jarfile="${project.build.directory}/exploded/WEB-INF/services/Login.aar">
@@ -418,7 +418,7 @@
                             <filtering>true</filtering>
                         </resource>
                     </webResources>
-                    
<webappDirectory>${project.build.directory}/deploy/axis2-json-api.war</webappDirectory>
+                    
<webappDirectory>${project.build.directory}/deploy/axis2-json-api</webappDirectory>
                 </configuration>
                 <executions>
                     <execution>

Reply via email to