struts.xml的配置简介

原文地址:http://www.blogjava.net/hawk8359/archive/2008/01/11/174319.html (作者J2ee-zero

DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN" "http://struts.apache.org/dtds/struts-2.0.dtd" >
<struts>

    

    
<include file="struts-default.xml">include>
    
    

    
<package name="com" extends="struts-default" namespace="/test">
        
<interceptors>
            

            
<interceptor name="token" class="com.token" />
            

            
<interceptor-stack name="defaultStack">
                
<interceptor-ref name="token" />
            
interceptor-stack>
        
interceptors>
        
        

        
<default-interceptor-ref name="token" />        
        
        

        
<global-results>
            
<result name="input">/error.jspresult>
        
global-results>
        
        

        
<action name="hello" class="com.HelloWorld">
            

            
<interceptor-ref name="token" />
        
           

           
<result name="success" type="dispatcher">/talk.jspresult>
           

           
<param name="url">http://www.blogjava.netparam>
        
action>
    
package>
struts>

你可能感兴趣的:(structs)