Use tomcat to publish the mule Service

Source: Internet
Author: User

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.