Jboss中的上下文路径

Pri*_*ank 9 jboss contextpath

目前在JBOSS中部署了一场战争.如果我想在Jboss中找出WAR的上下文路径,我应该在哪里查看?在server.xml?

net*_*ger 11

如果您的应用程序打包为WAR文件,那么您可以在WAR文件的WEB-INF文件夹下创建jboss-web.xml,并在jboss-web.xml中指定context-root,如下所示 -

<jboss-web>
  <context-root>MyWebAppContext</context-root>
</jboss-web>
Run Code Online (Sandbox Code Playgroud)

如果您的应用程序打包为EAR文件,那么您可以在EAR的META-INF/application.xml中指定context-root,如下所示

<module>  
  <web>  
    <web-uri>MyWAR.war</web-uri>  
    <context-root>MyWebAppContext</context-root>  
  </web>  
</module>  
Run Code Online (Sandbox Code Playgroud)