You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by bu...@apache.org on 2005/11/23 08:01:07 UTC
DO NOT REPLY [Bug 37599] New: -
Tiles Request Processor - Character encoding
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=37599>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=37599
Summary: Tiles Request Processor - Character encoding
Product: Struts
Version: 1.1 Final
Platform: Other
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: Tiles framework
AssignedTo: dev@struts.apache.org
ReportedBy: chitrala@rediffmail.com
Hi,
I have a requirement where in I need to use UTF8 encoding for my web app since
it needs to support chinese characters. In another words, form labels, button
labels and entire site content needs to be in chinese. I am using the below
environment for my project.
Env:
Tomcat - v5.0.28
J2SDK - v1.4.2
OS - Windows XP / Linux 2.1AS/i386
I am using TilesRequestProcessor. I tried different ways of changing charset
to UTF8 but all my efforts went futile. Is this some kind of bug?
I tried in the following different ways but the output is same for all my
attempts :( The character encoding is defaulting to "ISO-8859-1"
Try 1: Used the following meta tag in my Template.jsp
<META http-equiv="Content-Type" content="text/html;charset=UTF-8">
Try 2: Configure it at Tomcat's connector level in server.xml as below
<Connector port="8080"
maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
enableLookups="false" redirectPort="8443" acceptCount="100"
debug="0" connectionTimeout="20000"
disableUploadTimeout="true"
URIEncoding="UTF-8"/>
Try 3: Configre it at Controller class level in struts-config.xml as below
<controller
processorClass="org.apache.struts.tiles.TilesRequestProcessor"
contentType="text/html;charset=UTF-8"/>
Try 4: Configure it at your form level as below
<html:form method="POST" action="encoding" enctype="text/html;charset=UTF-8">
Neither of the above 4 attemps produced fruitful results.
One interesting observation in this exercise is that if I use a tiles-
definition for my action forwards UTF8 encoding won't happen
i.e,
<action
path="/encoding"
name="indexForm"
type="com.test.ui.action.IndexAction"
parameter="method"
scope="request"
validate="false"
input="/index.jsp">
<forward name="ENCODING_REDIRECT" path="encoding"/>
</action>
<definition name="encoding" extends="mainTemplate" >
<put name="body" value="/pages/encoding.jsp" />
</definition>
But if I specify the target jsp something like this UTF8 encoding works !!
<action
path="/encoding"
name="indexForm"
type="com.test.ui.action.IndexAction"
parameter="method"
scope="request"
validate="false"
input="/index.jsp">
<forward name="ENCODING_REDIRECT"
path="/pages/encoding.jsp"/>
</action>
Is there any fix available for this?
Thanks
- Kishore
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org