如何在一个.ear文件中拥有两个.war文件?

4

我使用的是jboss 4.0.2版本,想要将两个.war文件放在同一个.ear文件中。


1
@Vinegar:因为在单个EAR中包含多个WAR是常见的做法? - skaffman
@skaffman:抱歉,经验不足。 ;P - Adeel Ansari
1个回答

10

我本以为这个问题从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>

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接