Hi,
We had the same problem but we are using weblogic. May this will give you a
clue on what needs to be changed in Tomcat.
We did the following to solve the problem :
In weblogic's web.xml we have following snippet
        <context-param>
                <param-name>weblogic.jsp.encoding</param-name>
                <param-value>iso-8859-1</param-value>
        </context-param>

In all the jsps we dish out we have following :
<html>
<head>
        <meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1">  
</head>
This was for display, which you said you have already achieved.
And finally to accept the characters in the same encoding format we added
following line in weblogic.properties .

weblogic.httpd.inputCharset./*=iso-8859-1.

I think you will have to something similar in tomcat's properrties file

HTH
-Amar



-----Original Message-----
From: Adam Hardy [mailto:[EMAIL PROTECTED] 
Sent: Monday, March 01, 2004 3:47 AM
To: Struts Users Mailing List
Subject: Re: Problems with UTF-8 and forms


On 03/01/2004 12:29 AM Jon Bohm wrote:
> BUT if I rewrite my custombean's getValue method it all works fine 
> (except for swedish uppercase letters):
> 
> public String getValue()
> {
>     return new String( value.getBytes(), "UTF-8");
> }

Still shouldn't be necessary.

> Apache Tomcat/5.0.12
> Java 1.4.2_01-b06
> Struts 1.1 (I think - how do I check?)
> Windows XP (I know, I'm a Linuxdude gone bad)

Open up struts.jar in winzip or something and view META-INF/MANIFEST.mf 
- check implementation-version.

So what does the debugging say at the end of your JSPs? Is your response 
UTF-8 or iso-xxxx encoded? I bet it says the page content-type is still 
iso-8859.

How are you setting your struts controller parameter (in struts-config.xml):

<set-property property="contentType"
   value="text/html; charset=UTF-8"/>

Do you have any locale-encoding-mapping-list in your web.xml? You don't 
need it with UTF-8. You also don't need to specify it in any 
jsp-property-group since the struts controller will handle it.


>>>http://www.anassina.com/struts/i18n/i18n.html
>>
>>Good link, but getting a little out-of-date now.
> 
> 
> You have a better one? :)

I wish! If you get this solved, we can condense this thread and post it 
in the struts wikki.

Adam
-- 
struts 1.1 + tomcat 5.0.16 + java 1.4.2
Linux 2.4.20 Debian


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to