ssi环境web.xml
Java develop SSI configration templete
< !-- ******************* ss intergrated configration ******************* -->
<!-- log4j configration-->
<context-param>
<param-name>log4jConfigLocation</param-name>
<!-- classpath: /WEB-INF/classes/ -->
<!-- file: log4j.xml or log4j.properties -->
<!-- eg: /WEB-INF/classes/log4j.properties -->
<param-value>classpath:/log4j.properties</param-value>
< /context-param>
<listener>
<listener-class>org.springframework.web.util.Log4jConfigListener</listener-class>
< /listener>
<!-- spring applicationContext file path configration-->
<context-param>
<param-name>contextConfigLocation</param-name>
<!-- file: applicatonContext-*.xml or custom define -->
<!-- eg: /WEB-INF/classes/applicatonContext-common.xml -->
<param-value>classpath:/applicatonContext-common.xml</param-value>
< /context-param>
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
< /listener>
<!-- struts2 configration-->
<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>/*</url-pattern>
< /filter-mapping>
< !-- ******************* other common configration ******************* -->
<!-- character encoding filter -->
<filter>
<filter-name>encodingFilter</filter-name>
<filter-class>
org.springframework.web.filter.CharacterEncodingFilter
</filter-class>
<init-param>
<param-name>encoding</param-name>
<param-value>UTF-8</param-value>
</init-param>
<!-- enforce convert encoding -->
<init-param>
<param-name>forceEncoding</param-name>
<param-value>true</param-value>
</init-param>
< /filter>
<filter-mapping>
<filter-name>encodingFilter</filter-name>
<url-pattern>/*</url-pattern>
< /filter-mapping>
<session-config>
<session-timeout>360</session-timeout>
< /session-config>
<welcome-file-list>
<welcome-file>sys_login</welcome-file>
< /welcome-file-list>
<error-page>
<error-code>400</error-code>
<location>/error/400.html</location>
< /error-page>
<error-page>
<error-code>404</error-code>
<location>/error/404.html</location>
< /error-page>
<error-page>
<error-code>403</error-code>
<location>/error/403.html</location>
< /error-page>
<error-page>
<error-code>500</error-code>
<location>/error/500.html</location>
< /error-page>
<!-- ******************* optional and can ******************* -->
<!-- integrated apache tiles configration-->
<context-param>
<param-name>org.apache.tiles.CONTAINER_FACTORY</param-name>
<param-value>org.apache.struts2.tiles.StrutsTilesContainerFactory</param-value>
< /context-param>
< context-param>
<param-name>org.apache.tiles.impl.BasicTilesContainer.DEFINITIONS_CONFIG</param-name>
<!-- eg: /WEB-INF/tiles.xml -->
<param-value>/WEB-INF/tiles.xml</param-value>
< /context-param>
< listener>
<listener-class>org.apache.struts2.tiles.StrutsTilesListener</listener-class>
< /listener>
<!-- spring refresh introspector prevent memory leaks -->
<listener>
<listener-class>org.springframework.web.util.IntrospectorCleanupListener</listener-class>
< /listener>