You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Huynh Ngoc Huy <hu...@yahoo.com> on 2002/11/14 02:30:31 UTC

Unicode in struts tag

  I'm using struts version 1.1b2. The followings are
my snippet codes:

*********  struts-config.xml *********
  ...
  <form-bean name="aForm"
       
type="org.apache.struts.action.DynaActionForm">
    <form-property name="msg" 
                   type="java.lang.String"/>
  ...
  <action path="/aPath"
          type="anAction"
          name="aForm">
    <forward name="target" path="/result.jsp"/>
  </action>
  ...

*********  anAction.java *********
  ...
  String s = <a unicode-string from mysql database>;
  PropertyUtils.setSimpleProperty(form, "msg", s);
  ...
  return mapping.findForward("target");

*********  index.jsp *********
  <%@ taglib uri="/WEB-INF/struts-html.tld" 
      prefix="html" %>

    <html:link page="/aPath.do">go</html:link>

*********  result.jsp *********
  <%@ taglib uri="/WEB-INF/struts-html.tld" 
      prefix="html" %>

  <html:form action="/aPath.do">
    <html:textarea property="msg" cols="30" rows="5"/>
  </html:form>

*****************************************************

  In the result.jsp, the textarea cannot display the
unicode-string correctly.
  Any help is appreciated !
  Thanks in advance,
  Huy


__________________________________________________
Do you Yahoo!?
U2 on LAUNCH - Exclusive greatest hits videos
http://launch.yahoo.com/u2

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>