您的位置:首页 > 编程语言 > Java开发

struts2配置文件中url传递参数中文乱码处理

2014-05-21 09:50 274 查看
配置文件

[html] view
plaincopy

<action name="sort*" class="sortManage" method="{1}">

<result name="*" type="redirect">/admin/linkSort/sortManage.jsp?mss=${mss}</result>

</action>

解决办法

[html] view
plaincopy

try {

mss=URLEncoder.encode(mss, "UTF-8");

System.out.println(mss);

} catch (UnsupportedEncodingException e) {

// TODO Auto-generated catch block

e.printStackTrace();

}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: