This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Struts and the fly likes question about chinese in struts Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "question about chinese in struts" Watch "question about chinese in struts" New topic
Author

question about chinese in struts

Jason Wu
Greenhorn

Joined: Sep 03, 2002
Posts: 13
i found it's the Strut tag that's _NOT_ handling the utf-8 encoding correctly.
I outputted the following on my result jsp after the chinese is inputted:
Here, the 'name' is inputted in Chinese and encoded as utf-8:
....
<H1> With the Bean Write tag </H1>
NAME=====><bean:write name="loginForm" property="name"/> <BR>
password ==><bean:write name="loginForm" property="password"/>
<HR>
<H1> With the standard Http request object </H1>
Name==><%= request.getParameter("name")%><BR>
password==><%= request.getParameter("password")%><BR>
With the bean:write tag the name is printed out as ???, while the standard
request object display the chinese characters correctly.
Can someone clarify why this is the case? I thought this would not matter
since reflection is doing the same call using
request.getParameter("property") to map the input to the form's property.
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15949
    
  19

You'd get better results asking in the Frameworks (Struts) forum where more people would know what you're talking about.
However, the new Struts (still in Beta) has as one of its primary goals significant improvements in I18N. The 1.0.2 release was a good start, but not good enough.


Customer surveys are for companies who didn't pay proper attention to begin with.
Simon Brown
sharp shooter, and author
Ranch Hand

Joined: May 10, 2000
Posts: 1913
    
    6
Moving to the Java frameworks forum...
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: question about chinese in struts
 
Similar Threads
question about chinese in struts
Unicode with Struts ?????
Array dispaly
new to Struts
javax.servlet.ServletException:javax.servlet.jsp.JspException: Cannot find bean: "riga" in any scope