cheng_you_know

学而时习之!

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::
 
当使用type=“redirectAction” 或type=“redirect”提交到一个action并且需要传递一个参数时。这里是有区别的: 
使用type=“redirectAction”时,结果就只能写Action的配置名,不能带有后缀:“.action” 
Java代码  
       
<action name="Login" class="steven.actions.LoginAction">  
  <result name="success" type="redirectAction">User?u_id=${loginBean.u_id}</result>  
</action>  
 
使用type=“redirect”时,结果应是action配置名+后缀名 
Java代码  
<action name="Login" class="steven.actions.LoginAction">  
   <result name="success" type="redirect">User.action?u_id=${loginBean.u_id}</result>  
</action> 
posted on 2014-03-06 10:59  cheng_you_know  阅读(204)  评论(0编辑  收藏  举报