web.xml文件配置
来源:互联网 发布:china 网络娱乐传媒 编辑:程序博客网 时间:2024/05/16 16:59
web.xml文件配置
<?xml version="1.0" encoding="UTF-8"?><!-- <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd" > --><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"><display-name>newMavenWeb</display-name><!-- 配置struts过滤器 --><!-- http://blog.sina.com.cn/s/blog_6ac4c6cb010190ml.html --><!-- struts-default.xml 为struts-core.jar包中的文件,用于加载struts ,struts-plugin.xml 为struts-spring-plugin.jar包中文件,用于整合struts与spring, 文件中存在<constant name="struts.objectFactory" value="spring" /> Struts2的action由Spring来负责进行实例化 ,struts.xml 为自身struts配置文件,配置调用跳转信息--><filter><filter-name>struts2</filter-name><filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class><init-param> <param-name>config</param-name> <param-value>struts-default.xml,struts-plugin.xml,struts.xml</param-value> </init-param></filter><filter-mapping><filter-name>struts2</filter-name><url-pattern>*.action</url-pattern></filter-mapping><!-- spring监听器 --><listener><listener-class>org.springframework.web.context.ContextLoaderListener</listener-class></listener><!-- Spring配置文件 引入 --><context-param><param-name>contextConfigLocation</param-name><param-value>classpath*:/applicationContext*.xml</param-value></context-param><!-- 设置字符编码 --><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><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><!-- 是Spring提供的一个针对Hibernate的一个支持类,其主要意思是在发起一个页面请求时打开Hibernate的Session,一直保持这个Session,直到这个请求结束。 --><!-- http://blog.csdn.net/bluishglc/article/details/6283871 --><filter><filter-name>hibernateFilter</filter-name><filter-class>org.springframework.orm.hibernate3.support.OpenSessionInViewFilter</filter-class></filter><filter-mapping><filter-name>hibernateFilter</filter-name><url-pattern>/*</url-pattern></filter-mapping></web-app>
0 0
- web.xml文件配置
- web.xml文件配置
- web.xml文件配置
- 【文件配置】web.xml
- web.xml文件的配置
- web.xml文件的配置
- [Struts2]配置 web.xml文件
- 配置Struts2 web.xml文件
- struts2配置web.xml文件
- web.xml文件配置详解
- web.xml文件的配置
- web.xml文件配置详解
- web.xml 文件配置01
- web.xml文件的配置
- web.xml文件配置总结
- web.xml文件配置详解
- 为Struts应用配置web.xml文件
- Struts 项目中web.xml文件配置
- vs2010 快捷键大全
- 常用Spring配置项
- pat 1037
- iOS复习笔记12:分类
- linux+vim+gcc+gdb开发C&C++程序环境搭建
- web.xml文件配置
- Linux网络编程之socket文件传输示例
- 基于stm32F407 10KHZPWM方波以及PWM周期计算
- uploadify多文件上传参数设置
- LINQPad的使用
- 传真百科:传真文档工作流
- SQL语句 创建 链接服务器
- 使用Xcode上传Flash应用
- 浅拷贝与深拷贝