struts2
supper1009042136
这个作者很懒,什么都没留下…
展开
-
web传递中文参数
传递之前先编码 username=URLEncoder.encode("参数","utf-8"); 接受参数后解码 URLDecoder.decode(new String(request.getParameter("username").getBytes("ISO8859-1"),"utf-8"),"utf-8")转载 2012-06-11 19:25:47 · 203 阅读 · 0 评论 -
struts2 中用redirect时 参数的传递
(方法一): 我现在需要把一个action(action1)中的变量传递到另外的一个action(action2)中,两个action中都定义了属性 String userId,User user,并且定义了相应的getter,setter方法,在struts.xml中配置如下: Action2 / 同一个namespace时可以不写 ${user} ${userId}转载 2012-06-11 18:32:27 · 262 阅读 · 0 评论