Link to home
Start Free TrialLog in
Avatar of chpchai
chpchai

asked on

Using struts, display Chinese

When using the bean tag, usually i write
<bean:write name="herb" property="type" />
to display the value of a variable of a bean.

However, when the value of a string variable is chinese, i have to change the encoding to display it properly.
i usually write:
<%=new String(herb.getType().getBytes("iso8859_1"),"big5")%>

my question is, can i just the bean tag to display the chinese properly instead of the jsp expression?
ASKER CERTIFIED SOLUTION
Avatar of kennethxu
kennethxu

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of chpchai
chpchai

ASKER

so i should encode the string first in hte bean, not in the jsp page?
yes, if you can show us the bean. we might be able to help.
Avatar of chpchai

ASKER

ok, thanks~
you are very welcome! but is any reason for a 'C' grade?
http://www.cityofangels.com/Experts/Closing.htm#7
Avatar of chpchai

ASKER

well, seems i gave wrong the grade according to that description...
but can i still change it?
Thank you all!