Fórumok

Import .lar file issue on Encoding with Glassfish as Web Application Server

Al-Mothafar Al-Hasan, módosítva 12 év-val korábban

Import .lar file issue on Encoding with Glassfish as Web Application Server

Regular Member Bejegyzések: 110 Csatlakozás dátuma: 2009.12.06. Legújabb bejegyzések
Hi

Simply I have an Issue with Liferay 5.2 SP4 with importing .lar file, only when liferay deployed on Glassfish, when the content have special character (Including non-latin characters like Arabic) with UTF-8 these character will corrupted after importing (all these characters going to be strange symbols or question marks), I tested Importing .lar file with liferay deployed on tomcat but I have no problem, this issue happening only on Glassfish as a Web Application Server (GF 2.1.1 or GF 3.1.1).

I think the key of problem is: "Glassfish uses ISO-8859-1 encoding by default"

So I :
add "-DFile.encoding=UTF-8" to Glassfish JVM Options

Followed : http://stackoverflow.com/questions/6279504/unable-to-change-charset-from-iso-8859-1-to-utf-8-in-glassfish-3-1 and I added :
<jsp-property-group>
	        <url-pattern>*.jsp</url-pattern>
	        <page-encoding>UTF-8</page-encoding>
	    </jsp-property-group>

In liferay WEB-INF/web.xml
before:



and in <DOMAIN_HOME>/config/default-web.xml changed
<!--?xml version="1.0" encoding="ISO-8859-1"?-->


to
<!--?xml version="1.0" encoding="UTF-8"?-->


And put "commons-codec-repackaged.jar" into "<GLASSFISH_HOME>/modules".

But with no luck !
Any solution left, I need it ASAP really emoticon
Al-Mothafar Al-Hasan, módosítva 11 év-val korábban

RE: Import .lar file issue on Encoding with Glassfish as Web Application Se

Regular Member Bejegyzések: 110 Csatlakozás dátuma: 2009.12.06. Legújabb bejegyzések
Any Solution can I have, this post from long time and still need it , Issue still not fixed !