struts.xml 跳转到.action配置

struts.xml 跳转到.action配置

type="redirect-action" 加上这个可以解决从一个action跳转到别一个action里

<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE struts PUBLIC

    "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"

    "http://struts.apache.org/dtds/struts-2.0.dtd" >

<struts>

    <constant name="struts.objectFactory" value="spring"></constant>

    <package name="crm_employee" extends="struts-default" namespace="/emp">

        <action name="add" class="addBean" method="add">

           <result type="redirect-action">list.action</result>

        </action>

      

        <action name="list" class="listBean" method="list">

           <result>list.jsp</result>

        </action>

      

        <action name="delete" class="deleteBean" method="delete">

           <result>list.action</result>

        </action>

    </package>

</struts>

你可能感兴趣的:(struts.xml 跳转到.action配置)