I want to get a value from a JSP in Action,like follows:
/*jsp*/
<%@ page contentType="text/html;charset=gb2312" %>
<html:text property="ex"/>
....

And I input a Chinese Word in ex area,then I get the ex value from a
Action,like follows:
/*Action*/
public ActionForward execute(ActionMapping mapping,ActionForm
form,HttpServletRequest request,HttpServletResponse response) throws
Exception {
  request.setCharacterEncoding("gb2312");
  String ex=request.getParameter("ex");
....

But I find ex don't show propertly,it should show right Chinese word,but it
shows ???????í?±,I use DynaActionForm,like follows:
<form-bean
  name="tt"
 type="org.apache.struts.action.DynaActionForm">
  form-property
  name="ex"
  type="java.lang.String"/>
...

Why struts don't show propertly? How to show Chinese Word in Struts Action?

Thanks.

Reply via email to