`

Book-No.01 大型门户网站是怎样练成的

 
阅读更多

1、Struts2

 

     1)Struts2过滤器配置

 

<!-- 配置Struts2核心控制器  -->
	<filter>
		<filter-name>struts2</filter-name>
		<filter-class>
			org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter
		</filter-class>
	</filter>
	<filter-mapping>
		<filter-name>struts2</filter-name>
		<url-pattern>*.action</url-pattern>
	</filter-mapping>
	<filter-mapping>
		<filter-name>struts2</filter-name>
		<url-pattern>*.jsp</url-pattern>
	</filter-mapping>
	<filter-mapping>
		<filter-name>struts2</filter-name>
		<url-pattern>*.js</url-pattern>
	</filter-mapping>
  
  	<!-- 配置Struts2过滤器 -->
	<filter>
		<filter-name>struts2-cleanup</filter-name>
		<filter-class>
			org.apache.struts2.dispatcher.ActionContextCleanUp
		</filter-class>
	</filter>
	<filter-mapping>
		<filter-name>struts2-cleanup</filter-name>
		<url-pattern>/*</url-pattern>
	</filter-mapping>
	
    <!-- 配置spring的监听器 -->  
	<listener>  
	    <listener-class>  
	        org.springframework.web.context.ContextLoaderListener  
	    </listener-class>  
	</listener>

 

 

 

 

 

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics