java 如何在一个 .ear 文件中包含两个 .war 文件?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/2220891/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-29 20:08:03 来源:igfitidea点击:
how to I have two .war files within one .ear file?
提问by kiya
I use jboss 4.0.2 and i want to have two .war files within one .ear file .
我使用 jboss 4.0.2,我想在一个 .ear 文件中包含两个 .war 文件。
回答by skaffman
I would have thought this was self-evident from the structure of the EAR's application.xml file, but here's an example of how it looks with two WARs:
我原以为这从 EAR 的 application.xml 文件的结构中是不言而喻的,但这里有一个示例,说明它在两个 WAR 中的表现:
<?xml version="1.0" encoding="UTF-8"?>
<application>
<module>
<web>
<web-uri>/directory/of/war1</web-uri>
<context-root>/war1</context-root>
</web>
</module>
<module>
<web>
<web-uri>/directory/of/war2</web-uri>
<context-root>/war2</context-root>
</web>
</module>
</application>

