Java技术

Java、Java
posts - 6, comments - 0, trackbacks - 0, articles - 1
  BlogJava :: 首页 :: 新随笔 :: 联系 :: 聚合  :: 管理

在配置文件中传递参数

Posted on 2008-10-28 11:29 没完没了 阅读(360) 评论(0)  编辑  收藏 所属分类: struts2
方法1:直接在跳转url后面跟参数

  <result  type="redirect-action">edit?id=${id}</result>
直接jsp页面
<result name="input">edit.jsp?id=${id}</result>
方法2:使用参数<param>
<result name="success" type="redirect-action">
 <param name="id">${id}</param>
 </result>

我使用到
<result  type="redirect-action">edit?id=${id}</result>,可以成功接收
注意:属于struts2 action的地址不带struts后缀,即不带.do、.action等,

参考文章地址:
http://www.kudee.cn/html/Develop/Struts/20070916/2257.html
http://blog.csdn.net/mengfanpp/archive/2007/12/16/1942059.aspx
http://struts2.group.javaeye.com/group/blog/134505





只有注册用户登录后才能发表评论。


网站导航: