Search in sources :

Example 1 with HttpUrlRewrite

use of org.apache.camel.component.urlrewrite.HttpUrlRewrite in project camel by apache.

the class Http4UrlRewriteModTest method createRegistry.

@Override
protected JndiRegistry createRegistry() throws Exception {
    JndiRegistry jndi = super.createRegistry();
    // START SNIPPET: e1
    HttpUrlRewrite myRewrite = new HttpUrlRewrite();
    myRewrite.setModRewriteConfText("RewriteRule page/([^/\\.]+)/?$ index.php?page=$1 [L]");
    // END SNIPPET: e1
    jndi.bind("myRewrite", myRewrite);
    return jndi;
}
Also used : JndiRegistry(org.apache.camel.impl.JndiRegistry) HttpUrlRewrite(org.apache.camel.component.urlrewrite.HttpUrlRewrite)

Example 2 with HttpUrlRewrite

use of org.apache.camel.component.urlrewrite.HttpUrlRewrite in project camel by apache.

the class Http4UrlRewritePingQueryTest method createRegistry.

@Override
protected JndiRegistry createRegistry() throws Exception {
    JndiRegistry jndi = super.createRegistry();
    HttpUrlRewrite myRewrite = new HttpUrlRewrite();
    myRewrite.setConfigFile("example/urlrewrite-ping.xml");
    myRewrite.setUseQueryString(true);
    jndi.bind("myRewrite", myRewrite);
    return jndi;
}
Also used : JndiRegistry(org.apache.camel.impl.JndiRegistry) HttpUrlRewrite(org.apache.camel.component.urlrewrite.HttpUrlRewrite)

Example 3 with HttpUrlRewrite

use of org.apache.camel.component.urlrewrite.HttpUrlRewrite in project camel by apache.

the class Http4UrlRewritePingTest method createRegistry.

@Override
protected JndiRegistry createRegistry() throws Exception {
    JndiRegistry jndi = super.createRegistry();
    HttpUrlRewrite myRewrite = new HttpUrlRewrite();
    myRewrite.setConfigFile("example/urlrewrite-ping.xml");
    myRewrite.setUseQueryString(false);
    jndi.bind("myRewrite", myRewrite);
    return jndi;
}
Also used : JndiRegistry(org.apache.camel.impl.JndiRegistry) HttpUrlRewrite(org.apache.camel.component.urlrewrite.HttpUrlRewrite)

Example 4 with HttpUrlRewrite

use of org.apache.camel.component.urlrewrite.HttpUrlRewrite in project camel by apache.

the class Http4UrlRewriteTest method createRegistry.

@Override
protected JndiRegistry createRegistry() throws Exception {
    JndiRegistry jndi = super.createRegistry();
    HttpUrlRewrite myRewrite = new HttpUrlRewrite();
    myRewrite.setConfigFile("example/urlrewrite2.xml");
    jndi.bind("myRewrite", myRewrite);
    return jndi;
}
Also used : JndiRegistry(org.apache.camel.impl.JndiRegistry) HttpUrlRewrite(org.apache.camel.component.urlrewrite.HttpUrlRewrite)

Example 5 with HttpUrlRewrite

use of org.apache.camel.component.urlrewrite.HttpUrlRewrite in project camel by apache.

the class JettyUrlRewriteLoadBalanceRoundRobinTest method createRegistry.

@Override
protected JndiRegistry createRegistry() throws Exception {
    JndiRegistry jndi = super.createRegistry();
    HttpUrlRewrite myRewrite = new HttpUrlRewrite();
    myRewrite.setConfigFile("example/urlrewrite2.xml");
    jndi.bind("myRewrite", myRewrite);
    return jndi;
}
Also used : JndiRegistry(org.apache.camel.impl.JndiRegistry) HttpUrlRewrite(org.apache.camel.component.urlrewrite.HttpUrlRewrite)

Aggregations

HttpUrlRewrite (org.apache.camel.component.urlrewrite.HttpUrlRewrite)18 JndiRegistry (org.apache.camel.impl.JndiRegistry)18