zoukankan      html  css  js  c++  java
  • 2018.12.16 struts.xml 结果集方式分析 && 源码查看

    1.结果集

    转发
    重定向
    转发Action
    重定向Action
    
    <?xml version="1.0" encoding="UTF-8"?>
     <!DOCTYPE struts PUBLIC
    	"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
    	"http://struts.apache.org/dtds/struts-2.3.dtd">
    
    <struts>
    <!-- 是否开启开发模式
    	struts.enable.DynamicMethodInvocation = false
     -->
    	<constant name="struts.enable.DynamicMethodInvocation" value="true"></constant>
    	
    	<package name="result" namespace="/" extends="struts-default">
    		<!-- 转发 -->
    		<action name="Demo1Action" class="com.legend.action.Demo1Action" method="execute">
    			<result name="success" type="dispatcher">/hello.jsp</result>
    		</action>
    		
    		<!-- 重定向 -->
    		<action name="Demo2Action" class="com.legend.action.Demo2Action" method="execute">
    			<result name="success" type="redirect">/hello.jsp</result>
    		</action>
    		
    		<!-- 转发到action -->
    		<action name="Demo3Action" class="com.legend.action.Demo3Action" method="execute">
    			<result type="chain">
                	 <!-- action的名字 -->
                	 <param name="actionName">Demo1Action</param>
                	 <!-- action所在的命名空间 -->
                	 <param name="namespace">/</param>
             	</result>
    		</action>
    		
    		<!-- 转发到action -->
    		<action name="Demo4Action" class="com.legend.action.Demo4Action" method="execute">
    			<result type="redirectAction">
    				<!-- action的名字 -->
                 	<param name="actionName">Demo1Action</param>
                 	<!-- action所在的命名空间 -->
                 	<param name="namespace">/</param>
             	</result>
    		</action>
    	</package>
    	
    	<!-- 引入xml文件 -->
    	<include file="com/legend/b_api/struts.xml"></include>
    	<include file="com/legend/c_param/struts.xml"></include>
    </struts>	
    
  • 相关阅读:
    第31课
    第30课
    第29课
    第28课
    第27课
    ubuntu 允许root用户登录到ssh
    openfire 安装配置时出现The Openfire database schema does not appear to be installed. Follow the installati错误的解决方案
    ubuntu 16 “无法获得锁”解决方案
    增加phpmyadmin导入文件上限
    ubuntu-查看所有用户
  • 原文地址:https://www.cnblogs.com/qichunlin/p/10148612.html
Copyright © 2011-2022 走看看