geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Petersson <pe...@pmb.mine.nu>
Subject Re: JSP Charset problem.
Date Mon, 28 May 2007 09:48:52 GMT
Hi Giulio

I don't know if you are running G in a windows or unix system but in a 
unix system you can
try to add this information to a setenv.sh file in geronimo/bin. If you 
want to take a look at
what startup parameters are suported they are listed in geronimo.sh.

You can try add -Dfile.encoding=UTF-8 to JAVA_OPTS in the seventv.sh 
file. Somting like this:
setenv.sh
---------------------------------------------------------
#!/bin/sh

JAVA_HOME=/usr/lib/jvm/java-1.5.0-sun
JAVA_OPTS="-Dfile.encoding=UTF-8 -Djava.awt.headless=true 
-XX:MaxPermSize=128m -Xms128M -Xmx512M -server"

---------------------------------------------------------
end setenv.sh

I think there are a similar solution for windows.
I hope this helps
/Peter

Giulio Ferro wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Peter Petersson ha scritto:
>   
>> Hi Giulio
>>
>> If I understand you right  you have a working configuration when you are
>> starting and running the G server in a UTF-8 environment.
>> You can check the encoding settings used by Geronimo via the console 
>> JVM section.
>> To make sure the browser knows what encoding to expect  you can add the
>> following to the beginning of the JSP files
>> <?xml version="1.0" encoding="UTF-8"?>
>> and/or
>> <meta http-equiv="Content-Type" content="application/xhtml+xml;
>> charset=UTF-8" />
>> Encoding problem can be really tricky especially if the text sources
>> also are fetched from a database where double encoding can be a issue.
>> I hope this helps.
>> /Peter
>>
>>     
>
> The problem is not the browser. All pages have the right request /
> response setter to the correct character set (UTF-8). As I said
> dynamic content from db is displayed correctly.
>
> The problem is JSP compilation.
>
> I have to find a way to tell geronimo to compile the jsp with the
> correct character set. By default it uses the character set of the
> user who is running geronimo, but I want it to use the character set
> I want (the -encoding switch of the javac compiler).
>
> Bye.
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.5 (GNU/Linux)
> Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org
>
> iD8DBQFGWp2SNTLkailsstIRAvEuAJ9/pUurEAmZUoYOJ4eCn9Sg0CBM1QCgtFXa
> nmibqxi4hMQzZOVNGi1T3FM=
> =m8Hh
> -----END PGP SIGNATURE-----
>   


Mime
View raw message