jersy / urlrewritefilter

Automatically exported from code.google.com/p/urlrewritefilter
Other
0 stars 0 forks source link

provide my own VariableReplacer #151

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I need to add my own properties to urlrewrite.xml. I can extend 
org.tuckey.web.filters.urlrewrite.substitution.VariableReplacer but the library 
does just new VariableReplacer(), without any configuration or dependency 
injection. Therefore I'm stuck with your version of VariableReplacer.

It would be great to define a class that is used instead.

Example approach with urlrewrite.xml:

<urlrewrite>
    <variable-replacer class="net.nowaker.VariableReplacer" />
</urlrewrite>

Or with web.xml:

<filter>
    <filter-name>UrlRewriteFilter</filter-name>
    <filter-class>org.tuckey.web.filters.urlrewrite.UrlRewriteFilter</filter-class>
    <init-param>
        <param-name>variable-replacer-class</param-name>
        <param-value>net.nowaker.VariableReplacer</param-value>
    </init-param>
</filter>

Original issue reported on code.google.com by enwukaer@gmail.com on 21 Oct 2013 at 12:34