Configure UTF-8 Encoding in JBOSS 6.1 EAP -
i'm using jboss 6.1 eap , i'm having problems encoding. need set enconding utf-8. search , i'm found solutions no 1 works, have suggets?
i try doesn't work:
<system-properties> <property name="org.apache.catalina.connector.uri_encoding" value="utf-8"/> <property name="org.apache.catalina.connector.use_body_encoding_for_query_string" value="true"/> please help!
property org.apache.catalina.connector.uri_encoding relates uri encoding not content of request/response you'll need check:
web.xml
<jsp-config> <jsp-property-group> <url-pattern>/*</url-pattern> <page-encoding>utf-8</page-encoding> </jsp-property-group> </jsp-config> enforce encoding filters:
public void dofilter(servletrequest request, servletresponse response, filterchain chain) throws ioexception, servletexception { response.setcontenttype("text/html; charset=utf-8"); request.setcharacterencoding("utf-8"); response.setcharacterencoding("utf-8"); chain.dofilter(request, response); } jsp directives "pageencoding" or html meta tags
<%@ page pageencoding="utf-8" %> <meta charset="utf-8"/> and system property
file.encoding=utf-8
Comments
Post a Comment