有人可以帮助我如何对简单的骡子应用进行战争。 我的mule应用程序包含一个mule-config.xml文件。 我已经在ecplise中创建了这个mule项目,并且可以将其作为mule服务器运行。 我的要求是发动战争并将其部署在tomcat或tcat服务器中。
谢谢和问候, Arijit
答案 0 :(得分:4)
作为explained in the user guide:
要将Mule嵌入到webapp中,您需要提供一个或多个配置文件位置作为上下文参数,并包含一个上下文侦听器来初始化Mule Server。
所以只需在你的web.xml中添加这个,在你的类路径的根目录下使用mule-config.xml(例如,在src / main / resources中):
<context-param>
<param-name>org.mule.config</param-name>
<param-value>mule-config.xml</param-value>
</context-param>
<listener>
<listener-class>org.mule.config.builders.MuleXmlBuilderContextListener</listener-class>
</listener>
编辑我开源了一个正在运行的演示:https://github.com/ddossot/mule-webapp-example