Open GoogleCodeExporter opened 9 years ago
What steps will reproduce the problem? 1. Add the attribute URIEncoding="UTF-8" to Tomcat's server.xml "<Connector>" tag. 2. Create a simple JSP page (e.g. "search.jsp") that prints out the "item" parameter. 3. Call this JSP directly with an UTF-8 encoded URL, like : http://localhost:8080/MyProject/search.jsp?item=m%C3%A9tro The parameter is "métro" encoded in UTF-8, and it is correctly decoded by Tomcat with respect to the URIEncoding="UTF-8" option. 4. Now, set up URL Rewrite Filter with the following rule : <urlrewrite use-query-string="true" decode-using="UTF-8"> <rule match-type="regex"> <from>^/recherche\?item=([%\+\-0-9a-zA-Z;]+)$</from> <to>/search.jsp?item=$1</to> </rule> </urlrewrite> 5. Call your JSP through the address : http://localhost:8080/MyProject/recherche?item=m%C3%A9tro What is the expected output? What do you see instead? It should return "métro", just like the direct call to the JSP. Instead, it displays the ISO-8859-1 string : "métro". What version of the product are you using? On what operating system? Tomcat 7 and URL Rewrite Filter 3.2 Please provide any additional information below.
Original issue reported on code.google.com by gcolbert@gmail.com on 23 Feb 2012 at 1:05
gcolbert@gmail.com
Original issue reported on code.google.com by
gcolbert@gmail.com
on 23 Feb 2012 at 1:05