在WAR文件中定义contextroot

Moh*_*igh 10 deployment websphere command-line war contextroot

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

我怎么做?我想,我需要添加一些内容WEB-INF/ibm-web-bnd.xml.我不知道写些什么.

请帮忙,谢谢.

Bre*_*ail 20

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>
Run Code Online (Sandbox Code Playgroud)