[ 
https://issues.apache.org/jira/browse/WW-3561?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Lukasz Lenart updated WW-3561:
------------------------------

    Fix Version/s: Future
    
> Struts2.1.8 use Tiles not to support chinese(Internationalization I18n) 
> ------------------------------------------------------------------------
>
>                 Key: WW-3561
>                 URL: https://issues.apache.org/jira/browse/WW-3561
>             Project: Struts 2
>          Issue Type: Bug
>    Affects Versions: 2.1.8
>         Environment: Windows XP, Eclipse, Tomcat6.0.14, Struts2.1.8, Maven
>            Reporter: keming.hu
>             Fix For: Future
>
>         Attachments: StrutsHelloWorld.rar
>
>
> When I use struts2-core-2.1.8.jar and struts2-tiles-plugin-2.1.8.jar to test 
> a jsp which it needs I18n support for chinese, there are 
> ApplicationResources_en_US.properties and 
> ApplicationResources_zh_CN.properties in classpath. If I use tiles, for 
> example
>  <s:textfield name="userName" key="label.username" id="userName"  />
> The chinese will be produced disorder code (???) in the page
> I use this command native2ascii -encoding UTF-8 a.txt 
> ApplicationResources_zh_CN.properties. And all jsps adopt uniform charset 
> (utf-8)
> <%@ page contentType="text/html; charset=UTF-8 pageEncoding="UTF-8"%>
> Please refer to the following Struts.xml
> <struts>
> <constant name="struts.enable.DynamicMethodInvocation"
> value="false" />
> <constant name="struts.devMode" value="false" />
> <constant name="struts.custom.i18n.resources"
> value="ApplicationResources" />
> <package name="default" extends="struts-default" namespace="/">
> <result-types>
> <result-type name="tiles"
> class="org.apache.struts2.views.tiles.TilesResult" />
> </result-types>
> <action name="login"  
> class="net.viralpatel.struts2.LoginAction">
> <result name="success" type="tiles">/welcome.tiles</result>
> <result name="error">Login.jsp</result>
> </action>
> <action name="customer"  
> class="net.viralpatel.struts2.CustomerAction">
> <result name="success" type="tiles">/customer.success.tiles</result>
> <result name="input" type="tiles">/customer.tiles</result>
> </action>
> <action name="customer-form">
> <result name="success" type="tiles">/customer.tiles</result>
> </action>
> </package>
> </struts>
> But when I do not use tiles, these jsps will display correctly
> Please refer to the Struts.xml
> <struts>
> <constant name="struts.enable.DynamicMethodInvocation"
> value="false" />
> <constant name="struts.devMode" value="false" />
> <constant name="struts.custom.i18n.resources"
> value="ApplicationResources" />
> <package name="default" extends="struts-default" namespace="/">
> <action name="login"  
> class="net.viralpatel.struts2.LoginAction">
> <result name="success">Welcome.jsp</result>
> <result name="error">Login.jsp</result>
> </action>
> <action name="customer"  
> class="net.viralpatel.struts2.CustomerAction">
> <result name="success" >Customer.jsp</result>
> <result name="input">Customer.jsp</result>
> </action>
> <action name="customer-form">
> <result name="success">Customer.jsp</result>
> </action>
> </package>
> </struts>

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to