struts2.xml配置要点(验证基于方法级)

  • <!---->>    
  • <struts>    
  •   
  • <include file="struts-default.xml" />    
  • <!---->  
  • <package name="default" extends="struts-default">  
  •   
  • <!---->  
  • <result-types>    
  •   <result-type name="freemarker" class="org.apache.struts2.views.freemarker.FreemarkerResult" default="true" />    
  • result-types>  
  •   
  • <!---->  
  • <action name="login" class="com.opensymphony.xwork2.ActionSupport">  
  • <!---->  
  •   <result>/Login.ftlresult>  
  • action>    
  • <action name="userInput" class="pro.action.app.UserRegisterAction">    
  •   <interceptor-ref name="createSession">    
  •   <!---->  
  •     <!---->    
  •   interceptor-ref>    
  •   <interceptor-ref name="token">  
  •     <param name="excludeMethods">input,back,cancelparam>    
  •   interceptor-ref>    
  •   <interceptor-ref name="model-driven" />    
  •   <interceptor-ref name="validationWorkflowStack">  
  •     <!---->   
  •     <param name="validation.excludeMethods">input,back,cancelparam>    
  •     <param name="workflow.excludeMethods">input,back,cancelparam>    
  •   interceptor-ref>    
  •   <result name="invalid.token">/doubleSubmit.htmlresult>    
  •   <result name="input">/app/UserRegister.ftlresult>    
  •   <result name="login">/Login.ftlresult>    
  •   <result name="success">/Login.ftlresult>    
  • action>  
  • <!---->  
  • package>    
  • <include file="cfg/struts/struts-filedownload.xml">include>  
  • struts>    
  • 你可能感兴趣的:(apache,xml,freemarker,struts,workflow)