The first time I wrote this thing ....
After studying mule 3.0.1 for a while, I will share with you how to use myeclipse to create a project using mule and then start the service using tomcat.
The procedure is as follows:
1: Download Tomcat
2: Add CONF/server. XML in the Tomcat directory
<Listener classname ="Org. mule. Module. tomcat. muletomcatlistener"/>
3: Create a folder mule-libs under the Tomcat root directory (if there is no need to repeat it)
4: folder (Apart from the boot folderCopy to the newly created mule-libs directory.
5: jcl-over-slf4j-1.6.1.jar, log4j-1.2.14.jar, slf4j-api-1.6.1.jar, slf4j-log4j12-1.6.1.jar In the mule/lib/boot folder
Put it in the tomcat/mule-libs/OPT folder
6: Find under mule/libMule-module-Tomcat-<version number>. Jar (usually in the mule directory) copyTomcat/mule-libs/mule
7. Modify the tomcat/CONF/Catalina. properties file and find the common. loader attribute field and add it later.
$ {Catalina. home}/mule-libs/user /*. jar, $ {Catalina. home}/mule-libs/mule /*. jar, $ {Catalina. home}/mule-libs/opt /*. jar
Of course, use ',' to separate the existing configuration.
Create a web project in myeclipse
Put the jar package of mule under the WEB-INF/lib .. running may cause errors. You need to download some additional jar package ..
Add in Web. xml
<Context-param>
<Param-Name> org. mule. config </param-Name>
<Param-value> mule-config.xml </param-value>
</Context-param>
<! -- This listener will start up mule inside the webapp -->
<Listener>
<Listener-class> org. mule. config. builders. mulexmlbuildercontextlistener </listener-class>
</Listener>
Load project such as Tomcat server .. Run
Note: This is the first time you write this article for reference. If you are not considerate, please forgive me.