struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jonny Cavell <>
Subject Character encoding problems with Struts 2 and Freemarker or Velocity
Date Sat, 29 Dec 2007 16:23:01 GMT

I am setting default_encoding=UTF-8 in, and leaving the
struts encoding in untouched (i.e.
struts.i18n.encoding=UTF-8). When I use a struts action to forward to a test
page with Spanish text, without specifying the type (thus defaulting to
jsp), it outputs fine. However, if the action forwards to the same page, but
specifying the type as freemarker, the output is garbled. It is also garbled
for Velocity, making me think that the problem must lie somewhere within
Struts 2.

Even if I subclass FreemarkerManager, override the createConfiguration
method and explicitly call config.setDefaultEncoding("utf-8") here, and
specify this class as the struts.freemarker.manager.classname in, it makes no difference - the output is garbled.

Does anybody know why this might be the case?



View this message in context:
Sent from the Struts - User mailing list archive at

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

View raw message