Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » Struts 2 »

Problems with special characters in an ActionForm

uni

2006-12-29

Replies:

Hi,

I have a simple action form where users can enter texts, including special
characters such as German umlauts. If a user enters "m?ller" in the text field,
I only get "m??ller" from the actionform. I assume that there is a problem with
the encoding, but I don't know how I can resolve it.

The actionform looks like this:
<html:form action="/test">
 <html:text property="text" />
 <html:submit>Submit</html:submit>
</html:form>


The Action itself uses a DynaValidatorForm:
DynaValidatorForm f = (DynaValidatorForm) form;
System.out.println(f.getString("text"));
return mapping.findForward(SUCCESS);

Any hints how I can get the right String from the dyna form?

Cheers,

Thorsten


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)

©2008 junlu.com - Jax Systems, LLC, U.S.A.