Search in sources :

Example 16 with HttpUrlRewrite

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

the class HttpUrlRewriteModTest 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 17 with HttpUrlRewrite

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

the class HttpUrlRewritePingTest 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 18 with HttpUrlRewrite

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

the class Http4UrlRewriteModFileTest method createRegistry.

@Override
protected JndiRegistry createRegistry() throws Exception {
    JndiRegistry jndi = super.createRegistry();
    HttpUrlRewrite myRewrite = new HttpUrlRewrite();
    myRewrite.setModRewriteConfFile("example/modrewrite.cfg");
    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