zoukankan      html  css  js  c++  java
  • Struts2 : action跳转时带参数跳转

    在实现action跳转到另一个action时,需要携带参数,可以直接在struts.xml配置文件中对应的跳转action的地方加上,参数的配置,用ognl表达式,可以从session中取值。
    如果要传递两个参数,中间用&代替&(xml中&要转义)
    Eg:

    <action name="check_*" class="aexamCheckAction" method="{1}">
        	<result name="checkpass" type="redirectAction">check_checkpage.action?eid=${#session.eid}</result>
        	<result name="submituser" type="redirectAction">groupuser_show.action?WorkGroupId=${#session.WorkGroupId}&amp;ExamId=${#session.ExamId}</result>
        	<result name="checkback" type="redirectAction">check_checkBackPage.action?successtag=1</result>
        	<result name="findalluser">/WEB-INF/artexam/printGroupUser.jsp</result>
        	<result name="findUserInfo">/WEB-INF/artexam/UserInfo.jsp</result>
        </action>
    
  • 相关阅读:
    用户模板和用户场景
    人月神话阅读笔记02
    人月神话阅读笔记01
    软件工程周总结07
    NABCD
    软件工程周总结06
    软件工程周总结05
    tomcat端口被占用
    SQLyog出现2003错
    一维最大子数组和(续)
  • 原文地址:https://www.cnblogs.com/flytree/p/11623885.html
Copyright © 2011-2022 走看看