日期:2014-05-20  浏览次数:20881 次

ssh 整合国际化问题
String yzm =(String)request.getSession().getAttribute("yzm");
ActionMessages ms = new ActionMessages();
try{
if (yzm .equals( request.getParameter("yzm"))){
request.setAttribute("userName",user.getUserid());
request.setAttribute("grade", Integer.valueOf(user.getGrade()));
ActionMessage m = new ActionMessage("not_have_userPassword");
ms.add("not_have_userPassword", m);
this.saveMessages(request, ms);
System.out.println(ms);
return mapping.findForward("register_sussecc");
}else{
ActionMessage m = new ActionMessage("not_have_userPassword");
ms.add("not_have_userPassword", m);
this.saveMessages(request, ms); System.out.println(ms);
return mapping.findForward("register_failure");

}
}catch(Exception e3){
ActionMessage m = new ActionMessage("not_have_userPassword");
ms.add("not_have_userPassword", m);
this.saveMessages(request, ms); System.out.println(ms);

e3.printStackTrace();
return mapping.findForward("register_failure");
}


控制台 我打印了下 {not_have_userPassword=[not_have_userPassword[]]} 是个空的

国际化文件 配置 not_have_userPassword=\u5BC6\u7801\u4E0D\u5BF9

我非常的纳闷 ms里 一直是个空 大家帮我看看 谢谢。



------解决方案--------------------
http://hi.baidu.com/xuchao_duizhang/blog/item/af2c4dcfd4d8a72ff8dc6127.html

看看完整实例,和你的对比一下