I want to delete this metadata : "déééé"
I have this HTTP REQUEST :
DELETE /test/api/metadata/d%C3%A9%C3%A9%C3%A9%C3%A9 HTTP/1.1
Host: localhost:8585
Connection: keep-alive
Accept: application/json, text/plain, */*
Origin: http://localhost:8585
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.95 Safari/537.36
Referer: http://localhost:8585/test/
Accept-Encoding: gzip, deflate, sdch
Accept-Language: fr-FR,fr;q=0.8,en-US;q=0.6,en;q=0.4
Cookie: JSESSIONID=4f789...
I have this Mapping Controller :
@RequestMapping(value = "metadata/{categoryName}", produces = "application/json", method = DELETE)
public @ResponseBody boolean deleteMetadata(@PathVariable String categoryName) {
return test.deleteCategory(categoryName);
}
but in my controller i get this : déééé so wrong encoding
in my web.xml i have this :
<filter>
<filter-name>CharacterEncodingFilter</filter-name>
<filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
<init-param>
<param-name>encoding</param-name>
<param-value>UTF-8</param-value>
</init-param>
<init-param>
<param-name>forceEncoding</param-name>
<param-value>true</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>CharacterEncodingFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<filter>
<filter-name>springSecurityFilterChain</filter-name>
<filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
</filter>
<filter-mapping>
<filter-name>springSecurityFilterChain</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
what is missing ?
Aucun commentaire:
Enregistrer un commentaire