Skip to content

Instantly share code, notes, and snippets.

@I82Much I82Much/jetty.xml
Created Jun 6, 2011

Embed
What would you like to do?
Mule 3 Jetty Configuration
<?xml version="1.0"?>
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure.dtd">
<Configure id="FileServer" class="org.mortbay.jetty.Server">
<Set name="handler">
<New class="org.mortbay.jetty.handler.HandlerList">
<Set name="handlers">
<Array type="org.mortbay.jetty.Handler">
<Item>
<New class="org.mortbay.jetty.handler.ResourceHandler">
<!-- Jetty 6.1.26, which comes with Mule 3.1, does not have this method -->
<!--<Set name="directoriesListed">true</Set>-->
<Set name="welcomeFiles">
<Array type="String">
<Item>index.html</Item>
</Array>
</Set>
<!-- This folder maps to the root URL configured for this Jetty endpoint. If I wanted to start serving content from the a folder named "static", I would replace the . with "static".-->
<Set name="resourceBase">.</Set>
</New>
</Item>
<Item>
<New class="org.mortbay.jetty.handler.DefaultHandler" />
</Item>
</Array>
</Set>
</New>
</Set>
</Configure>
<mule xmlns="http://www.mulesoft.org/schema/mule/core"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:spring="http://www.springframework.org/schema/beans"
xmlns:http="http://www.mulesoft.org/schema/mule/http"
xmlns:xm="http://www.mulesoft.org/schema/mule/xml"
xmlns:jetty="http://www.mulesoft.org/schema/mule/jetty"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/3.1/mule.xsd
http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/3.1/mule-http.xsd
scripting.xsd
http://www.mulesoft.org/schema/mule/xml http://www.mulesoft.org/schema/mule/xml/3.1/mule-xml.xsd
http://www.mulesoft.org/schema/mule/jetty http://www.mulesoft.org/schema/mule/jetty/3.1/mule-jetty.xsd"
>
<description>
This configuration uses an embedded Jetty instance to serve static content.
</description>
<jetty:connector configFile="${app.home}/conf/jetty.xml" name="jetty_connector" ></jetty:connector>
<!-- do not use localhost here or else you will only be able to connect locally.-->
<jetty:endpoint address="http://0.0.0.0:8080"
name="jettyEndpoint"
connector-ref="jetty_connector"
path="/">
</jetty:endpoint>
<model name="Jetty">
<service name="jettyUMO">
<inbound>
<jetty:inbound-endpoint ref="jettyEndpoint" />
</inbound>
</service>
</model>
</mule>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.