struts2.0中struts.xml配置文件详解(转)

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.kay.struts2"  extends ="struts-default"  namespace ="/test" >
        
< interceptors >
            

            
< interceptor  name ="timer"  class ="com.kay.timer" > interceptor >
            
< interceptor  name ="logger"  class ="com.kay.logger" > interceptor >
            

            
< interceptor-stack  name ="mystack" >
                
< interceptor-ref  name ="timer" > interceptor-ref >
                
< interceptor-ref  name ="logger" > interceptor-ref >
            
interceptor-stack >
        
interceptors >
        
        

        
< default-interceptor-ref  name ="mystack" > default-interceptor-ref >
        
        
        

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

        
< action  name ="hello"  class ="com.kay.struts2.Action.LoginAction" >
            

            
< interceptor-ref  name ="timer" > interceptor-ref >
        
            

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

         
< param  name ="url" > http://www.sina.com param >
        
action >
    
package >
struts >

你可能感兴趣的:(Struts,Struts,XML,JSP,Apache)