web.xml 配置内容

    技术2022-05-20  62

    <?xml version="1.0" encoding="UTF-8"?> <web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"> <!-- 配置JFreeChart项目的DisplayChart --> <servlet> <servlet-name>DisplayChart</servlet-name> <servlet-class>org.jfree.chart.servlet.DisplayChart</servlet-class> </servlet> <servlet-mapping> <servlet-name>DisplayChart</servlet-name> <url-pattern>/displayChart</url-pattern> </servlet-mapping> <!-- 配置JFreeChart项目的DisplayChart结束 --> <!-- 配置对siteMesh的支持=====注意:位置一定不要改变--> <!-- 配置ActionContextCleanUp过滤器 --> <filter> <filter-name>struts-cleanup</filter-name> <filter-class>org.apache.struts2.dispatcher.ActionContextCleanUp</filter-class> </filter> <!-- 配置ActionContextCleanUp过滤器结束 --> <!-- 配置SiteMesh过滤器 --> <filter> <filter-name>sitemesh</filter-name> <filter-class>com.opensymphony.module.sitemesh.filter.PageFilter</filter-class> </filter> <!-- 配置SiteMesh过滤器结束 --> <!-- 配置FilterDispatcher过滤器 --> <filter> <filter-name>struts2</filter-name> <filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class> </filter> <!-- 配置FilterDispatcher过滤器结束 --> <!-- 配置ActionContextCleanUp链 --> <filter-mapping> <filter-name>struts-cleanup</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> <!-- 配置ActionContextCleanUp链结束 --> <!-- 配置SiteMesh链 --> <filter-mapping> <filter-name>sitemesh</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> <!-- 配置SiteMesh链结束 --> <!-- 配置FilterDispatcher链 --> <filter-mapping> <filter-name>struts2</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> <!-- 配置FilterDispatcher链结束 --> <!-- 配置对siteMesh的结束=====注意:位置一定不要改变--> <!-- 配置Spring --> <listener> <listener-class> org.springframework.web.context.ContextLoaderListener </listener-class> </listener> <context-param> <param-name>contextConfigLocation</param-name> <param-value>classpath:applicationContext.xml</param-value> </context-param> <!-- 配置Spring结束 --> <welcome-file-list> <welcome-file>index.jsp</welcome-file> </welcome-file-list> </web-app>


    最新回复(0)