在WAR文件中定义contextroot [英] Define contextroot inside WAR file
本文介绍了在WAR文件中定义contextroot的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个自动部署脚本,在 WAS 7
中部署多个 WAR
文件。
所以,我想在 WAR
文件中定义 contextroot
。它应该从文件中自动设置为... -contextroot xxxx ...
。
I have an automated deployment script to deploy multiple WAR
files in WAS 7
.
So, I would like to define contextroot
inside the WAR
file itself. It should automatically set to " ... -contextroot xxxx ..."
from the file.
如何是我做的?我想,我需要添加一些 WEB-INF / ibm-web-bnd.xml
。
我不知道该写什么。
How do I do that? I think, I need to add something with WEB-INF/ibm-web-bnd.xml
.
I dont know what to write in it.
谢谢。
推荐答案
使用以下内容创建 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>
这篇关于在WAR文件中定义contextroot的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文