Java 子上下文的上下文根

Java 子上下文的上下文根,java,jakarta-ee,websphere,Java,Jakarta Ee,Websphere,我耳朵里有多个war文件。每个war文件对应一个特定的版本。这是打包结构: TestServiceEAR ServiceOneWAR --> http://host:port/test/1.0 ServiceTwoWAR --> http://host:port//test/2.0. 我想把ServiceOneWAR作为目标,ServiceTwoWAR作为目标。我试图将TestServiceEAR/EARContent/META-IN

我耳朵里有多个war文件。每个war文件对应一个特定的版本。这是打包结构:

TestServiceEAR
          ServiceOneWAR  -->  http://host:port/test/1.0
          ServiceTwoWAR  -->  http://host:port//test/2.0.
我想把ServiceOneWAR作为目标,ServiceTwoWAR作为目标。我试图将TestServiceEAR/EARContent/META-INF/application.xml中的上下文根设置为/test/1.0和/test/2.0,但这不起作用

请建议这是否可以在WebSphereApplicationServer中实现。我无权访问组织中的web服务器

application.xml是:

   <?xml version="1.0" encoding="UTF-8"?>
    <application xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application_6.xsd" version="6">
      <display-name>TestServiceEAR</display-name>
      <module>
        <web>
          <web-uri>TestService_v1.war</web-uri>
          <context-root>/test/1.0</context-root>
        </web>
      </module>
      <module id="Module_1431504891524">
        <web>
          <web-uri>TestService_v2.war</web-uri>
          <context-root>/test/2.0</context-root>
        </web>
      </module>
      <library-directory>lib</library-directory>
    </application>

测试服务耳
TestService_v1.war
/测试/1.0
TestService_v2.war
/测试/2.0
解放党
解决了这个问题。问题是我正在更新application.xml中的上下文,它被重置为pom.xml中以前的值。更新pom.xml后,问题得到解决

<webModule>
    <groupId>${war.groupId}</groupId>
    <artifactId>${war.artifactId}</artifactId>
    <uri>${war.artifactId}.war</uri>
    <bundleFileName>${war.artifactId}.war</bundleFileName>
    <contextRoot>/test/1.0</contextRoot>
</webModule>

${war.groupId}
${war.artifactId}
${war.artifactId}.war
${war.artifactId}.war
/测试/1.0

您可以发布整个application.xml文件吗?哪些文件不适合您?我刚刚对它进行了测试,jsp页面在test/1.0和test/2.0上下文中得到了正确的服务。感谢Gas和Thilak花时间研究这个问题。