yuankai / urlrewritefilter

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

outbound-rule example is wrong (2 errors) and incomplete description #135

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Ref: http://tuckey.org/urlrewrite/manual/4.0/#outbound-rule

1) Missing in description (useful):
For enable parse of "path?querystring" you MUST add use-query-string="true" in 
urlrewrite tag

<urlrewrite use-query-string="true">

2) Regex example is wrong
    ^/world.jsp?country=([a-z]+)&amp;city=([a-z]+)$

? is a special character, right regex is:
    ^/world.jsp\?country=([a-z]+)&amp;city=([a-z]+)$

3) JSTL example is wrong
    <a href="<c:url value="/world.jsp?country=${country}&amp;city=${city}" />">nyc</a>

&amp; in querystring is not standard and cause regex fail, right JSTL is:
    <a href="<c:url value="/world.jsp?country=${country}&city=${city}" />">nyc</a>

Original issue reported on code.google.com by omar.mia...@neosperience.com on 28 Mar 2013 at 3:53