【问题标题】:Context Path in JbossJboss 中的上下文路径
【发布时间】:2011-01-04 00:48:08
【问题描述】:

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

【问题讨论】:

    标签: jboss contextpath


    【解决方案1】:

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

    <jboss-web>
      <context-root>MyWebAppContext</context-root>
    </jboss-web>
    

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

    <module>  
      <web>  
        <web-uri>MyWAR.war</web-uri>  
        <context-root>MyWebAppContext</context-root>  
      </web>  
    </module>  
    

    【讨论】:

      【解决方案2】:

      在 Jboss 4.2.3 中,转到您的 jmx-console 并在 jboss.web 下找到应用程序及其上下文路径,例如: J2EEApplication=none,J2EEServer=none,j2eeType=WebModule,name=//localhost/jmx-console

      具有上下文路径“jmx-console/”

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2015-07-02
        • 2021-05-18
        • 1970-01-01
        • 1970-01-01
        • 2018-08-18
        • 2019-01-11
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多