struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Björn Raupach <>
Subject textfield escapes name attribute
Date Sat, 24 Jul 2010 16:37:14 GMT
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:

  <td><s:textfield name="location.straße" label="Straße"/></td>

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 &ouml;
and so on...

	<td><input type="text" name="location.stra&szlig;e" id="LocationAction_save_location_stra&szlig;e"></input></td>

However we can enter umlauts in a input field and have the value properly encoded in the property
of the bean.

  <td><s:textfield name="location.ort" label="Ort"/></td>

If we enter 'München' in this input field, we actually recieve 'München' on the server.

We use struts2 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"

Any ideas?

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

View raw message