【问题标题】:Define contextroot inside WAR file在 WAR 文件中定义 contextroot
【发布时间】:2012-01-19 01:38:22
【问题描述】:

我有一个自动部署脚本来部署WAS 7 中的多个WAR 文件。 所以,我想在WAR 文件本身中定义contextroot。它应该从文件中自动设置为" ... -contextroot xxxx ..."

我该怎么做?我想,我需要用WEB-INF/ibm-web-bnd.xml 添加一些东西。 我不知道该写什么。

请帮忙,谢谢。

【问题讨论】:

    标签: deployment command-line websphere war contextroot


    【解决方案1】:

    使用这些内容创建WEB-INF/ibm-web-ext.xml

    <web-ext
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xmlns="http://websphere.ibm.com/xml/ns/javaee"
      xsi:schemaLocation="http://websphere.ibm.com/xml/ns/javaee http://websphere.ibm.com/xml/ns/javaee/ibm-web-ext_1_0.xsd"
      version="1.0"
    >
      <context-root uri="/TestProject"/>
    </web-ext>
    

    【讨论】:

      猜你喜欢
      • 2011-02-05
      • 2014-09-06
      • 2016-11-17
      • 1970-01-01
      • 1970-01-01
      • 2011-01-18
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多