Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/webpack/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Websphere liberty Websphere liberty向ear/application.xml中提到的上下文根添加前缀_Websphere Liberty - Fatal编程技术网

Websphere liberty Websphere liberty向ear/application.xml中提到的上下文根添加前缀

Websphere liberty Websphere liberty向ear/application.xml中提到的上下文根添加前缀,websphere-liberty,Websphere Liberty,我们正在使用WebSphereLiberty 8.5.5.9。我想知道是否有任何方法可以覆盖/添加自定义前缀到ear中打包的所有web应用程序 我不想在application.xml级别这样做。相反,我希望在server.xml级别执行此操作。有办法吗 例如,如果我的ear包含两个war模块,其上下文根是sample1、sample2。前缀后面的最后一个上下文根应该类似于example/sample1、example/sample2。在WebSphere Liberty上, 我不认为有一种方法可

我们正在使用WebSphereLiberty 8.5.5.9。我想知道是否有任何方法可以覆盖/添加自定义前缀到ear中打包的所有web应用程序

我不想在application.xml级别这样做。相反,我希望在server.xml级别执行此操作。有办法吗

例如,如果我的ear包含两个war模块,其上下文根是sample1、sample2。前缀后面的最后一个上下文根应该类似于example/sample1、example/sample2。

在WebSphere Liberty上, 我不认为有一种方法可以使作为ear文件一部分的web模块的上下文根工作(通过在server.xml中定义)。但您可以按如下方式定义web模块的上下文根:

您也可以为ear文件定义上下文根,但它会被忽略

CWWKZ0126W:在{1}应用程序上指定的{0}上下文根值无效。 解释上下文根属性对于企业应用程序无效。该值不会用于企业应用程序中包含的任何web模块


更多详细信息参见这在8.5.5.9中是不可能的,但在当前的测试版(2017年2月)中是可能的。从该级别开始,您可以在server.xml中指定通常出现在war文件中的ibm-web-ext.xml文件中的扩展配置。配置将类似于:

<application location="myEar.ear">
 <web-ext moduleName="myWar1.war" context-root="sample1"/>
 <web-ext moduleName="myWar2.war" context-root="sample2"/>
</application>


谁能帮帮我吗。顺便说一句,这是需要弹性负载平衡嗯。。。对不起,我没有仔细阅读你的问题。您要求调整EAR中的所有战争,而不是给定server.xml中的所有战争。我将删除该答案。