String truename =new String(request.getParameter("trueName").getBytes("ISO-8859-1"),"UTF-8");这句接收到的字符串转码后怎么赋给form表单里文本框里的value??
<s:textfield name="customer.trueName" label="真实名字" value="%{#parameters.trueName}"></s:textfield>
<s:textfield name="customer.trueName" label="真实名字" value="%{#parameters.trueName}"></s:textfield>
<s:textfield name="customer.trueName" label="真实名字" value="%{requestScope.trueName}"></s:textfield>即可,但是这个转向必须是forward类型的!这样request才能保留!
<input type="text" name="customer.trueName" value="<%=new String(request.getParameter("trueName").getBytes("ISO-8859-1"),"UTF-8")%>"/>
因为接收过来还要转码,所以我就需要这样做,也许还有更简单的,但是目前我只能这样了!