You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Dmitry Kashin <kd...@exch.inec.kharkov.com> on 2003/04/10 16:57:52 UTC

Re[4]: Tiles i18n bug

Hello Community

Solution:
In whole Tiles distribution there are no encounters of contentType directive but in
every page we have the next <%@ page language="java" %>.
After changing it to <%@ page contentType="text/html; charset=UTF-8"%>
problem gone.

(In definition pages this header was present from the beginning that's
why they working standalone)

It is better to include <%@ page contentType="text/html;charset=UTF-8"%>
in Tiles distribution to avoid such problems in future.

Thanks for the help.

DK> We have next bug(detailed description):
DK> If page invoked by its address, then everything ok, characters
DK> displays correctly.

DK> <%@ page contentType="text/html;charset=UTF-8" language="java"%>
DK> <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%>
DK> <%@ taglib uri="/WEB-INF/struts-html-el.tld" prefix="html"%>
DK> <%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic"%>
DK> <%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles"%>

DK> <html:html locale="true">
DK> <head>
DK> <html:base/>
DK> </head>
DK> <body>
DK>         <h1><bean:message key="index.title"/></h1>
DK> </body>
DK> </html:html>

DK> If same page used from the <tiles:insert> by <tiles:insert page="baseLayout"/>
DK> (<tiles:insert definition="logon"/>)
DK> and specified in tiles-defs.xml as:
DK>         <definition name="baseLayout" page="/common/baseLayout.jsp"/>
DK> National characters are gone and '?????' comes.
DK> In struts-config.xml and web.xml we use snippets from standard
DK> examples.

DK> Please help, I can't believe that nobody use Tiles with its national
DK> languages or give a link to possible solution.
DK> TIA

DK>> Hello

DK>> It seems that messages ok, but trouble rendering. If we use Cp1251
DK>> in content type and messages in this character set in bundle(its bad
DK>> idea) messages displaying correct, but if bundle in unicode and
DK>> character set UTF-8 we have '????'.
DK>> TIA

JK>>> are you doing any validation with null=false in your action servlet
JK>>> (struts-config.xml)?
JK>>> It displays ???? stuff when it can't find a message resource on a 
JK>>> validation error.

JK>>> -jeff

JK>>> On Thursday, April 10, 2003, at 07:09  AM, Dmitry Kashin wrote:

>>>> Hello All
>>>>
>>>>  Problem:
>>>>  Using Struts - everything ok.
>>>>  Using Struts + Tiles - Tiles page has '????' messages, Struts pages
>>>>  still ok.
>>>>  Struts 1.1RC1 and 20030408 identical effect.
>>>>  Any suggestions???
>>>>  TIA
>>>>
>>>>


DK>> ---------------------------------------------------------------------
DK>> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
DK>> For additional commands, e-mail: struts-user-help@jakarta.apache.org


DK> ---------------------------------------------------------------------
DK> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
DK> For additional commands, e-mail: struts-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org