struts 2 결과 유형

<?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>
<package name="resulttype" namespace="/resulttype" extends="struts-default">
<default-action-ref name="helloWorldAction"></default-action-ref>
<action name="resulttypeAction" class="cn.itcast.resulttype.ResulttypeAction">
<!--          ,
*type:      ,     "dispatcher" 
-->
<!-- <result name="success" type="dispatcher">/resulttype/success.jsp</result>
 -->
<!--     -->
<!-- <result name="success" type="dispatcher">
param:  
*name:      "location"
   , struts2     StrutsResultSupport  setLocation()   
*      ,   set    get             
<param name="location">/resulttype/success.jsp</param>
</result> -->
<!--     jsp:org.apache.struts2.dispatcher.ServletRedirectResult -->
<!-- <result name="success" type="redirect">
<param name="location">/resulttype/success.jsp</param>
</result> -->
<!--     action -->
<result name="success" type="redirectAction">
<!-- 
param:
*actionName:  "   "     。    Struts.xml  action   name    
*namespace:    struts.xml  ,action   package  namespace    
-->
<param name="actionName">helloWorldAction</param>
<param name="namespace">/primer</param>
</result>
</action>
</package>
</struts>

좋은 웹페이지 즐겨찾기