BlogJava 联系 聚合 管理  

Blog Stats

随笔档案(17)

文章档案(1)


GaoWei

<?xml version="1.0" encoding="UTF-8"?>


<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
    http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">

    <!-- 加载spring配置 -->
    <context-param>
        <param-name>contextConfigLocation</param-name>
        <param-value>classpath:META-INF/spring/spring*.xml</param-value>
    </context-param>

    <listener>
        <listener-class>
            org.springframework.web.context.ContextLoaderListener
        </listener-class>
    </listener>

    <!-- hibernate session配置 -->
    <filter>
        <filter-name>OpenSessionInViewFilter</filter-name>
        <filter-class>
            org.springframework.orm.hibernate3.support.OpenSessionInViewFilter
        </filter-class>
    </filter>
    <filter-mapping>
        <filter-name>OpenSessionInViewFilter</filter-name>
        <url-pattern>*.ftl</url-pattern>
    </filter-mapping>
    <filter-mapping>
        <filter-name>OpenSessionInViewFilter</filter-name>
        <url-pattern>*.jsp</url-pattern>
    </filter-mapping>
    <filter-mapping>
        <filter-name>OpenSessionInViewFilter</filter-name>
        <url-pattern>*.html</url-pattern>
    </filter-mapping>

    <!-- struts2配置 -->
    <filter>
        <filter-name>struts</filter-name>
        <filter-class>
            org.apache.struts2.dispatcher.FilterDispatcher
        </filter-class>
        <init-param>
            <param-name>actionPackages</param-name>
            <param-value>
                cn.ynzc.product.web.statistics.action,
                cn.ynzc.product.web.system.action,
                cn.ynzc.product.web.list.action,
                cn.ynzc.product.web.sellFactory.action,
                cn.ynzc.product.web.action
            </param-value>
        </init-param>
    </filter>


    <filter>
        <filter-name>struts-cleanup</filter-name>
        <filter-class>
            org.apache.struts2.dispatcher.ActionContextCleanUp
        </filter-class>
    </filter>
    <filter>
        <filter-name>sitemesh</filter-name>
        <filter-class>
            org.apache.struts2.sitemesh.FreeMarkerPageFilter
        </filter-class>
    </filter>

    <filter-mapping>
        <filter-name>struts-cleanup</filter-name>
        <url-pattern>/*</url-pattern>
    </filter-mapping>
    <filter-mapping>
        <filter-name>sitemesh</filter-name>
        <url-pattern>/*</url-pattern>
    </filter-mapping>
    <filter-mapping>
        <filter-name>struts</filter-name>
        <url-pattern>/*</url-pattern>
    </filter-mapping>


    <!-- struts2 使用jsp标签 -->
    <servlet>
        <servlet-name>JspSupportServlet</servlet-name>
        <servlet-class>
            org.apache.struts2.views.JspSupportServlet
        </servlet-class>
        <load-on-startup>1</load-on-startup>
    </servlet>



    <welcome-file-list>
        <welcome-file>index.jsp</welcome-file>
        <welcome-file>login.html</welcome-file>
    </welcome-file-list>
    <!-- Struts Tag Library Descriptors -->

</web-app>


posted on 2007-06-12 22:05 gggg874 阅读(312) 评论(0)  编辑  收藏

只有注册用户登录后才能发表评论。


网站导航: