You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Björn Raupach <ra...@me.com> on 2010/07/24 18:37:14 UTC
textfield escapes name attribute
Hi group,
I am having some trouble with the textfield tag. We have java beans that use german umlauts as well as the letter 'ß' in some property names. To set the property in a from we use the textfield tag. Below is a snippet:
<tr>
<td>Straße</td>
<td><s:textfield name="location.straße" label="Straße"/></td>
</tr>
Problem is the rendered html page escapes the name attribute, which result in a null value for the property straße. Same goes for all properties that use umlauts. ö becomes ö and so on...
<tr>
<td>Straße</td>
<td><input type="text" name="location.straße" id="LocationAction_save_location_straße"></input></td>
</tr>
However we can enter umlauts in a input field and have the value properly encoded in the property of the bean.
<tr>
<td>Ort</td>
<td><s:textfield name="location.ort" label="Ort"/></td>
</tr>
If we enter 'München' in this input field, we actually recieve 'München' on the server.
We use struts2 2.1.8.1 and the javatemplates-plugin. Tomcat URIEncoding is set to UTF-8. Every jsp is encoded with UTF-8 and the headers are properly set.
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
Any ideas?
Björn
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org