JBOSS 7 encoding not working as expected
Posted
by
Fofole
on Stack Overflow
See other posts from Stack Overflow
or by Fofole
Published on 2012-04-19T13:07:14Z
Indexed on
2012/10/07
9:38 UTC
Read the original article
Hit count: 334
I had problems with my listgrids not showing diacritcs corectly and I found out that when I inserted from java into the db the values where already bugged.
A post here helped and I changed my project properties -> Text encoding -> other -> UTF-8 and this fixed my problem. Thing is this only fixes my problem locally.
What I need to do is on my Jboss server also set the encoding somehow. This is what I put in my configuration file:
<?xml version='1.0' encoding='UTF-8'?>
<server name="vali-ubuntu" xmlns="urn:jboss:domain:1.0">
extensions>
extension module="org.jboss.as.clustering.infinispan"/>
extension module="org.jboss.as.connector"/>
extension module="org.jboss.as.deployment-scanner"/>
extension module="org.jboss.as.ee"/>
extension module="org.jboss.as.ejb3"/>
extension module="org.jboss.as.jaxrs"/>
extension module="org.jboss.as.jmx"/>
extension module="org.jboss.as.logging"/>
extension module="org.jboss.as.naming"/>
extension module="org.jboss.as.osgi"/>
extension module="org.jboss.as.remoting"/>
extension module="org.jboss.as.sar"/>
extension module="org.jboss.as.security"/>
extension module="org.jboss.as.threads"/>
extension module="org.jboss.as.transactions"/>
extension module="org.jboss.as.web"/>
extension module="org.jboss.as.weld"/>
/extensions>
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="tru
e"/>
/system-properties>
//.....
This doesn't work so maybe I need to add something else. I tried everything I could find with no succes so any help is appreciated. Thanks.
EDIT:From what I read, this will work only in jboss 7.1.0 beta 1 or highier. (URIEncoding) and I use JBoss 7.0.2 so I need a replacement for 7.0.2
© Stack Overflow or respective owner