Author: buildbot
Date: Thu Jul 23 10:18:43 2015
New Revision: 959276
Log:
Production update by buildbot for camel
Modified:
websites/production/camel/content/cache/main.pageCache
websites/production/camel/content/urlrewrite.html
Modified: websites/production/camel/content/cache/main.pageCache
==============================================================================
Binary files - no diff available.
Modified: websites/production/camel/content/urlrewrite.html
==============================================================================
--- websites/production/camel/content/urlrewrite.html (original)
+++ websites/production/camel/content/urlrewrite.html Thu Jul 23 10:18:43 2015
@@ -86,48 +86,17 @@
<tbody>
<tr>
<td valign="top" width="100%">
-<div class="wiki-content maincontent"><h2
id="UrlRewrite-UrlRewriteComponent">UrlRewrite Component</h2>
-<p><strong>Available as of Camel 2.11</strong></p>
-
-<p>The <code>camel-urlrewrite</code> component allows to plugin url rewrite
functionality to <a shape="rect" href="http.html">HTTP</a>, <a shape="rect"
href="http4.html">HTTP4</a>, <a shape="rect" href="jetty.html">Jetty</a>, or <a
shape="rect" href="ahc.html">AHC</a> components. This component integrates the
<a shape="rect" class="external-link"
href="http://code.google.com/p/urlrewritefilter/"
rel="nofollow">UrlRewriteFilter</a> project with Apache Camel. This allows you
to use the capabilities from the url rewrite project with your Camel routes.</p>
-
-<p>This component <strong>requires</strong> that your Camel routes starts from
a servlet based endpoint such as <a shape="rect" href="jetty.html">Jetty</a> or
<a shape="rect" href="servlet.html">Servlet</a>.</p>
-
-<h3 id="UrlRewrite-Options">Options</h3>
-
-<p>The <code>camel-urlrewrite</code> component offers the following options</p>
-
-<div class="confluenceTableSmall">
-<div class="table-wrap"><table class="confluenceTable"><tbody><tr><th
colspan="1" rowspan="1" class="confluenceTh"><p> Name </p></th><th colspan="1"
rowspan="1" class="confluenceTh"><p> Default Value </p></th><th colspan="1"
rowspan="1" class="confluenceTh"><p> Description </p></th></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"><p> <code>conf</code> </p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p> <code>null</code> </p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p> To use a custom
<code>org.tuckey.web.filters.urlrewrite.Conf</code> as the configuration for
the url rewrite filter. </p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p> <code>configFile</code> </p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p> <code>null</code> </p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p> Refers to a file name to load as the
configuration file. The file should be XML file. </p></td></tr><tr><td
colspan="1" rowspan="1" class=
"confluenceTd"><p> <code>modRewriteConfFile</code> </p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p> <code>null</code> </p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p> Refers to a file name to load as the
Apache mod_rewrite style based configuration file. This file should be a plain
text file. </p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p> <code>modRewriteConfText</code> </p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p> <code>null</code> </p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p> Is used to quickly configure a
Apache mod_rewrite style based configuration without using a file.
</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>
<code>useQueryString</code> </p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p> <code>false</code> </p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p> Whether to use query strings in the url
rewrite rules. </p></td></tr><tr><td colspan="1" row
span="1" class="confluenceTd"><p> <code>useContext</code> </p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p> <code>false</code>
</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> Whether to
include context-path or not in the matching. Will be default remove the
context-path. </p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p> <code>defaultMatchType</code> </p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p> <code>"regex"</code> </p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p> Which match type to use. Can
be either "wildcard" or "regex". </p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p> <code>decodeUsing</code> </p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p> <code>null</code> </p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p> To use a specific encoding such as "utf-8"
or "iso-8859-1". </p></td></tr></tbody></table></div>
-</div>
-
-<h3 id="UrlRewrite-Usage">Usage</h3>
-
-<p>The following component producers supports using together with the
<code>camel-urlrewrite</code> component: <a shape="rect"
href="http.html">Http</a>, <a shape="rect" href="http4.html">Http4</a> and <a
shape="rect" href="jetty.html">Jetty</a>.</p>
-
-<div class="confluenceTableSmall">
-<div class="table-wrap"><table class="confluenceTable"><tbody><tr><th
colspan="1" rowspan="1" class="confluenceTh"><p> Component </p></th><th
colspan="1" rowspan="1" class="confluenceTh"><p> Class </p></th></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"><p> <code>camel-http</code>
</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>
<code>org.apache.camel.component.urlrewrite.http.HttpUrlRewrite</code>
</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>
<code>camel-jetty</code> </p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>
<code>org.apache.camel.component.urlrewrite.http.HttpUrlRewrite</code>
</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>
<code>camel-http4</code> </p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>
<code>org.apache.camel.component.urlrewrite.http4.HttpUrlRewrite</code>
</p></td></tr></tbody></table></div>
-</div>
-
-<p>You setup the url rewrite as a bean of the type
<code>org.apache.camel.component.urlrewrite.http.HttpUrlRewrite</code> (when
using <a shape="rect" href="http.html">Http</a> component) as shown below:</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent
panelContent pdl">
+<div class="wiki-content maincontent"><h2
id="UrlRewrite-UrlRewriteComponent">UrlRewrite
Component</h2><p><strong>Available as of Camel 2.11</strong></p><p>The
<code>camel-urlrewrite</code> component allows to plugin url rewrite
functionality to <a shape="rect" href="http.html">HTTP</a>, <a shape="rect"
href="http4.html">HTTP4</a>, <a shape="rect" href="jetty.html">Jetty</a>, or <a
shape="rect" href="ahc.html">AHC</a> components. This component integrates the
<a shape="rect" class="external-link"
href="http://code.google.com/p/urlrewritefilter/"
rel="nofollow">UrlRewriteFilter</a> project with Apache Camel. This allows you
to use the capabilities from the url rewrite project with your Camel
routes.</p><p>This component <strong>requires</strong> that your Camel routes
starts from a servlet based endpoint such as <a shape="rect"
href="jetty.html">Jetty</a> or <a shape="rect"
href="servlet.html">SERVLET</a>.</p><h3
id="UrlRewrite-Options">Options</h3><p>The <code>camel-urlrewrite</code
> component offers the following options</p><div
> class="confluenceTableSmall"><div class="table-wrap"><table
> class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1"
> class="confluenceTh"><p>Name</p></th><th colspan="1" rowspan="1"
> class="confluenceTh"><p>Default Value</p></th><th colspan="1" rowspan="1"
> class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1"
> rowspan="1" class="confluenceTd"><p><code>conf</code></p></td><td
> colspan="1" rowspan="1"
> class="confluenceTd"><p><code>null</code></p></td><td colspan="1"
> rowspan="1" class="confluenceTd"><p>To use a custom
> <code>org.tuckey.web.filters.urlrewrite.Conf</code> as the configuration for
> the url rewrite filter.</p></td></tr><tr><td colspan="1" rowspan="1"
> class="confluenceTd"><p><code>configFile</code></p></td><td colspan="1"
> rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td
> colspan="1" rowspan="1" class="confluenceTd"><p>Refers to a file name to
> load as the configuration file. The file should be X
ML file.</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><code>modRewriteConfFile</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p>Refers to a file name to load as the Apache
mod_rewrite style based configuration file. This file should be a plain text
file.</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><code>modRewriteConfText</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p>Is used to quickly configure a Apache
mod_rewrite style based configuration without using a
file.</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><code>useQueryString</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p><code>false</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p>Whether to use query strings in the url
rewrite r
ules.</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><code>useContext</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p><code>false</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p>Whether to include context-path or not in
the matching. Will be default remove the context-path.</p></td></tr><tr><td
colspan="1" rowspan="1"
class="confluenceTd"><p><code>defaultMatchType</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p><code>"regex"</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>Which match type to use. Can be
either "wildcard" or "regex".</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><code>decodeUsing</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p>To use a specific encoding such as "utf-8"
or "iso-8859-1".</p></td></tr></tbody></table></div></div><h3
id="UrlRewrite-Usage">U
sage</h3><p>The following component producers supports using together with the
<code>camel-urlrewrite</code> component: <a shape="rect"
href="http.html">HTTP</a>, <a shape="rect" href="http4.html">HTTP4</a> and <a
shape="rect" href="jetty.html">Jetty</a>.</p><div
class="confluenceTableSmall"><div class="table-wrap"><table
class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1"
class="confluenceTh"><p>Component</p></th><th colspan="1" rowspan="1"
class="confluenceTh"><p>Class</p></th></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><code>camel-http</code></p></td><td colspan="1"
rowspan="1"
class="confluenceTd"><p><code> <strong>C</strong></code><strong>amel 2.15
or
older:</strong><code> org.apache.camel.component.urlrewrite.http.HttpUrlRewrite</code></p></td></tr><tr><td
colspan="1" rowspan="1"
class="confluenceTd"><p><code>camel-jetty</code></p></td><td colspan="1"
rowspan="1"
class="confluenceTd"><p><code><code><strong>C</strong></code><strong>amel 2.1
5 or
older:</strong>org.apache.camel.component.urlrewrite.http.HttpUrlRewrite</code></p></td></tr><tr><td
colspan="1" rowspan="1"
class="confluenceTd"><p><code>camel-http4</code></p></td><td colspan="1"
rowspan="1"
class="confluenceTd"><p><code><code><strong>C</strong></code><strong>amel 2.15
or
older:</strong>org.apache.camel.component.urlrewrite.http4.HttpUrlRewrite</code></p></td></tr></tbody></table></div></div><p> </p><p>From <strong>Camel
2.16</strong> onwards this is no longer necessary and there is only one class,
which is <code>org.apache.camel.component.urlrewrite.HttpUrlRewrite</code>
that works with any of the components.</p><p> </p><p>You setup the url
rewrite as a bean of the type
<code>org.apache.camel.component.urlrewrite.http.HttpUrlRewrite</code> (when
using <a shape="rect" href="http.html">HTTP</a> component) as shown
below:</p><div class="code panel pdl" style="border-width: 1px;"><div
class="codeContent panelContent pdl">
<script class="brush: java; gutter: false; theme: Default"
type="syntaxhighlighter"><![CDATA[
HttpUrlRewrite myRewrite = new HttpUrlRewrite();
myRewrite.setConfigFile("example/urlrewrite2.xml");
]]></script>
-</div></div>
-
-<p>And in XML DSL you can do:</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent
panelContent pdl">
-<script class="brush: xml; gutter: false; theme: Default"
type="syntaxhighlighter"><![CDATA[
-<bean id="myRewrite"
class="org.apache.camel.component.urlrewrite.HttpUrlRewrite">
+</div></div>And in XML DSL you can do:<div class="code panel pdl"
style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="brush: xml; gutter: false; theme: Default"
type="syntaxhighlighter"><![CDATA[<bean id="myRewrite"
class="org.apache.camel.component.urlrewrite.HttpUrlRewrite">
<property name="configFile"
value="example/urlrewrite2.xml"/>
</bean>
]]></script>
-</div></div>
-
-<p>In the bean above we configure it with the <code>configFile</code> option
which is a XML <a shape="rect" class="external-link"
href="http://code.google.com/p/urlrewritefilter/"
rel="nofollow">UrlRewriteFilter</a> configuration file.</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent
panelContent pdl">
+</div></div><p>In the bean above we configure it with the
<code>configFile</code> option which is a XML <a shape="rect"
class="external-link" href="http://code.google.com/p/urlrewritefilter/"
rel="nofollow">UrlRewriteFilter</a> configuration file.</p><div class="code
panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
<script class="brush: xml; gutter: false; theme: Default"
type="syntaxhighlighter"><![CDATA[
<urlrewrite>
@@ -140,23 +109,12 @@ myRewrite.setConfigFile("example/ur
</urlrewrite>
]]></script>
-</div></div>
-
-<div class="confluence-information-macro
confluence-information-macro-tip"><span class="aui-icon aui-icon-small
aui-iconfont-approve confluence-information-macro-icon"></span><div
class="confluence-information-macro-body">
-<p>See more details at <a shape="rect" class="external-link"
href="http://code.google.com/p/urlrewritefilter/"
rel="nofollow">UrlRewriteFilter</a> for how to configure the XML rules
file.</p></div></div>
-
-<p>In the Camel routes, you bridge the endpoints, and refer to the url rewrite
on the producer endpoint as shown below. Notice how we refer to our url rewrite
filter using the <code>urlRewrite</code> option in the endpoint uri.</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent
panelContent pdl">
+</div></div><div class="confluence-information-macro
confluence-information-macro-tip"><span class="aui-icon aui-icon-small
aui-iconfont-approve confluence-information-macro-icon"></span><div
class="confluence-information-macro-body"><p>See more details at <a
shape="rect" class="external-link"
href="http://code.google.com/p/urlrewritefilter/"
rel="nofollow">UrlRewriteFilter</a> for how to configure the XML rules
file.</p></div></div><p>In the Camel routes, you bridge the endpoints, and
refer to the url rewrite on the producer endpoint as shown below. Notice how we
refer to our url rewrite filter using the <code>urlRewrite</code> option in the
endpoint uri.</p><div class="code panel pdl" style="border-width: 1px;"><div
class="codeContent panelContent pdl">
<script class="brush: java; gutter: false; theme: Default"
type="syntaxhighlighter"><![CDATA[
from("jetty:http://localhost:{{port}}/myapp?matchOnUriPrefix=true")
.to("jetty:http://localhost:{{port2}}/myapp2?bridgeEndpoint=true&throwExceptionOnFailure=false&urlRewrite=#myRewrite");
]]></script>
-</div></div>
-
-<h4 id="UrlRewrite-Usingloadbalancingeip">Using load balancing eip</h4>
-
-<p>You can also use Camel's <a shape="rect" href="load-balancer.html">Load
Balancer</a> together with <a shape="rect"
href="urlrewrite.html">UrlRewrite</a>, as shown below. In this code we use the
failover load balancer, to failover to the 2nd endpoint (which goes to myapp3)
in case of any exception thrown.</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent
panelContent pdl">
+</div></div><h4 id="UrlRewrite-Usingloadbalancingeip">Using load balancing
eip</h4><p>You can also use Camel's <a shape="rect"
href="load-balancer.html">Load Balancer</a> together with <a shape="rect"
href="urlrewrite.html">UrlRewrite</a>, as shown below. In this code we use the
failover load balancer, to failover to the 2nd endpoint (which goes to myapp3)
in case of any exception thrown.</p><div class="code panel pdl"
style="border-width: 1px;"><div class="codeContent panelContent pdl">
<script class="brush: java; gutter: false; theme: Default"
type="syntaxhighlighter"><![CDATA[
// we want to use the failover loadbalancer
// to have it to react we must set throwExceptionOnFailure=true, which is also
the default value
@@ -166,56 +124,18 @@ from("jetty:http://localhost:{{port
.to("jetty:http://localhost:{{port2}}/myapp2?bridgeEndpoint=true&throwExceptionOnFailure=true&urlRewrite=#myRewrite")
.to("jetty:http://localhost:{{port2}}/myapp3?bridgeEndpoint=true&throwExceptionOnFailure=true&urlRewrite=#myRewrite");
]]></script>
-</div></div>
-
-
-<h4 id="UrlRewrite-UsingApachemod_rewritestyleconfiguration">Using Apache
mod_rewrite style configuration</h4>
-
-<p>The <a shape="rect" class="external-link"
href="http://code.google.com/p/urlrewritefilter/"
rel="nofollow">UrlRewriteFilter</a> project also supports Apache mod_rewrite
style configuration. </p>
-
-<p>For example to configure the bean using the modRewriteConfFile property to
refer to a mod configuration file:</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent
panelContent pdl">
-<script class="brush: xml; gutter: false; theme: Default"
type="syntaxhighlighter"><![CDATA[
-<bean id="myRewrite"
class="org.apache.camel.component.urlrewrite.HttpUrlRewrite">
+</div></div><h4 id="UrlRewrite-UsingApachemod_rewritestyleconfiguration">Using
Apache mod_rewrite style configuration</h4><p>The <a shape="rect"
class="external-link" href="http://code.google.com/p/urlrewritefilter/"
rel="nofollow">UrlRewriteFilter</a> project also supports Apache mod_rewrite
style configuration.</p><p>For example to configure the bean using the
modRewriteConfFile property to refer to a mod configuration file:</p><div
class="code panel pdl" style="border-width: 1px;"><div class="codeContent
panelContent pdl">
+<script class="brush: xml; gutter: false; theme: Default"
type="syntaxhighlighter"><![CDATA[<bean id="myRewrite"
class="org.apache.camel.component.urlrewrite.HttpUrlRewrite">
<property name="modRewriteConfFile"
value="example/modrewrite.cxf"/>
</bean>
]]></script>
-</div></div>
-
-<p>Which then can contain mod rewrite rules and the likes:</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent
panelContent pdl">
+</div></div><p>Which then can contain mod rewrite rules and the likes:</p><div
class="code panel pdl" style="border-width: 1px;"><div class="codeContent
panelContent pdl">
<script class="brush: plain; gutter: false; theme: Default"
type="syntaxhighlighter"><![CDATA[
# our custom mod rewrite rule
RewriteRule page/([^/\.]+)/?$ index.php?page=$1 [L]
]]></script>
-</div></div>
-
-<p>You can have multiple RewriteRule rules and other configurations. See more
details at <a shape="rect" class="external-link"
href="http://code.google.com/p/urlrewritefilter/"
rel="nofollow">UrlRewriteFilter</a> project.</p>
-
-
-<h3 id="UrlRewrite-Writingcustomurlrewriters">Writing custom url rewriters</h3>
-
-<p>You can implement your custom url rewriters by implementing either of the
following interfaces from the component of choice:</p>
-
-<p>Component(s): camel-http / camel-jetty</p>
-<ul
class="alternate"><li><code>org.apache.camel.component.http.UrlRewrite</code></li><li><code>org.apache.camel.component.http.HttpServletUrlRewrite</code></li></ul>
-
-
-<p>Component(s): camel-http4</p>
-<ul
class="alternate"><li><code>org.apache.camel.component.http4.UrlRewrite</code></li><li><code>org.apache.camel.component.http4.HttpServletUrlRewrite</code></li></ul>
-
-
-<p>The former is a simple and generic interface, which is not dependent on the
Servlet API.<br clear="none">
-The later is servlet based which requires the Camel route to start from a
servlet based component such as <a shape="rect" href="jetty.html">Jetty</a> or
<a shape="rect" href="servlet.html">Servlet</a>. The servlet based is more
feature rich and that's the API we use to integrate with the <a shape="rect"
class="external-link" href="http://code.google.com/p/urlrewritefilter/"
rel="nofollow">UrlRewriteFilter</a> project in this
<code>camel-urlrewrite</code> component.</p>
-
-<h4 id="UrlRewrite-Asimpleurlrewritefilter">A simple url rewrite filter</h4>
-
-<p>In this example we implement a custom
<code>org.apache.camel.component.http.UrlRewrite</code> that just replaces
yahoo with google. Mind this example is based on a unit test, and only for
demonstration purposes. As its java code you have full power to implement more
complex logic.</p>
-
-<p>The url parameter contains the full url including
scheme://hostname:port/path?query. The relativeUrl parameter is the url without
the endpoint configured path. Notice this option may be null if the url doesn't
start with the endpoint configured path. </p>
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent
panelContent pdl">
+</div></div>You can have multiple RewriteRule rules and other configurations.
See more details at <a shape="rect" class="external-link"
href="http://code.google.com/p/urlrewritefilter/"
rel="nofollow">UrlRewriteFilter</a> project.<h3
id="UrlRewrite-Writingcustomurlrewriters">Writing custom url
rewriters</h3><p>You can implement your custom url rewriters by implementing
either of the following interfaces from the component of
choice:</p><p>Component(s): camel-http / camel-jetty</p><ul
class="alternate"><li><code>org.apache.camel.component.http.UrlRewrite</code></li><li><code>org.apache.camel.component.http.HttpServletUrlRewrite</code></li></ul><p>Component(s):
camel-http4</p><ul
class="alternate"><li><code>org.apache.camel.component.http4.UrlRewrite</code></li><li><code>org.apache.camel.component.http4.HttpServletUrlRewrite</code></li></ul><p>The
former is a simple and generic interface, which is not dependent on the
Servlet API.<br clear="none"> The later is servlet based which requ
ires the Camel route to start from a servlet based component such as <a
shape="rect" href="jetty.html">Jetty</a> or <a shape="rect"
href="servlet.html">SERVLET</a>. The servlet based is more feature rich and
that's the API we use to integrate with the <a shape="rect"
class="external-link" href="http://code.google.com/p/urlrewritefilter/"
rel="nofollow">UrlRewriteFilter</a> project in this
<code>camel-urlrewrite</code> component.</p><h4
id="UrlRewrite-Asimpleurlrewritefilter">A simple url rewrite filter</h4><p>In
this example we implement a custom
<code>org.apache.camel.component.http.UrlRewrite</code> that just replaces
yahoo with google. Mind this example is based on a unit test, and only for
demonstration purposes. As its java code you have full power to implement more
complex logic.</p><p>The url parameter contains the full url including
scheme://hostname:port/path?query. The relativeUrl parameter is the url without
the endpoint configured path. Notice this option may be null if
the url doesn't start with the endpoint configured path.</p><div class="code
panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
<script class="brush: java; gutter: false; theme: Default"
type="syntaxhighlighter"><![CDATA[
/**
* A very simple url rewrite that replaces yahoo with google in the url.
@@ -230,12 +150,8 @@ public class GoogleUrlRewrite implements
}
}
]]></script>
-</div></div>
-
-
-<h3 id="UrlRewrite-SeeAlso">See Also</h3>
-<ul><li><a shape="rect" href="configuring-camel.html">Configuring
Camel</a></li><li><a shape="rect"
href="component.html">Component</a></li><li><a shape="rect"
href="endpoint.html">Endpoint</a></li><li><a shape="rect"
href="getting-started.html">Getting Started</a></li></ul>
-<ul class="alternate"><li><a shape="rect"
href="jetty.html">Jetty</a></li><li><a shape="rect"
href="http4.html">Http4</a></li><li><a shape="rect"
href="http.html">Http</a></li><li><a shape="rect"
href="ahc.html">AHC</a></li></ul></div>
+</div></div><h3 id="UrlRewrite-SeeAlso">See Also</h3>
+<ul><li><a shape="rect" href="configuring-camel.html">Configuring
Camel</a></li><li><a shape="rect"
href="component.html">Component</a></li><li><a shape="rect"
href="endpoint.html">Endpoint</a></li><li><a shape="rect"
href="getting-started.html">Getting Started</a></li></ul><ul
class="alternate"><li><a shape="rect" href="jetty.html">Jetty</a></li><li><a
shape="rect" href="http4.html">HTTP4</a></li><li><a shape="rect"
href="http.html">HTTP</a></li><li><a shape="rect"
href="ahc.html">AHC</a></li></ul></div>
</td>
<td valign="top">
<div class="navigation">