struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adam Hardy <>
Subject Re: Problems with UTF-8 and forms
Date Mon, 01 Mar 2004 08:47:08 GMT
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/ 
- 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 

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.

>>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.

struts 1.1 + tomcat 5.0.16 + java 1.4.2
Linux 2.4.20 Debian

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message