<?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">
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
<!-- default: /WEB-INF/applicationContext.xml -->
</listener>
<context-param>
<param-name>contextConfigLocation</param-name>
<!-- <param-value>/WEB-INF/applicationContext-*.xml,classpath*:applicationContext-*.xml</param-value> -->
<param-value>classpath:beans.xml</param-value>
</context-param>
<!-- spring 配置XML 路径 -->
<filter>
<filter-name>encodingFilter</filter-name>
<filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
<init-param>
<param-name>encoding</param-name>
<param-value>GBK</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>encodingFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<!-- 转换字符集 -->
<filter>
<filter-name>openSessionInView</filter-name>
<filter-class>org.springframework.orm.hibernate3.support.OpenSessionInViewFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>openSessionInView</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<!-- 将SessionFactory 延长到jsp页面之后再关闭 -->
<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>
<!-- struts2 配置 -->
</web-app>
分享到:
相关推荐
ssh整合所需的jar包,spring-4.2.4版本,c3p0连接池,mysql数据库,hibernate-5.0.7版本,struts-2.3.24版本, spring-mvc.xml文件,web.xml文件,spring-common.xml文件,Adc.hbm.xml文件
ssh 整合所有配置文件的配置 各个标签如何填写 Struts2.xml配置文档 <?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.1//EN" ...
struts2+hibernate4+spring3的整合 步骤:a. 创建数据库表 userinfo b. 创建web工程,导入支持 c. 数据库表反向工程 d.向上推 jsp --> action --> service --> dao --> db e.配置spring 的...
1、proxool官网,下载最新的proxool-0.9.1.jar ...4、整合Struts2、Spring和proxool,配置Web服务启动配置文件[web.xml] 5、整合Spring和proxool,配置应用上下文配置文件[applicationContext.xml]
程序配置 --> web.xml 验证框架--> bean-validation.xml (实体验证)、SaveAction-validation.xml (保存验证)、UpdateAction-validation.xml (修改验证) 日志管理配置 --> log4j.xml 国际化配置->globalMessages_zh....
程序配置 --> web.xml 验证框架--> bean-validation.xml (实体验证)、SaveAction-validation.xml (保存验 证)、UpdateAction-validation.xml (修改验证) 日志管理配置 --> log4j.xml 国际化配置--...
ssh这个是常用的配置文件,里面包含hibernate.cfg.xml\struts.xml\beans.xml\log4j.properties\web.xml等等,是开发必备的配置文件
程序配置 --> web.xml 验证框架--> bean-validation.xml (实体验证)、SaveAction-validation.xml (保存验证)、UpdateAction-validation.xml (修改验证) 日志管理配置 --> log4j.xml 国际化配置-->...
SSH整合示例(详情见我博客专栏)之前的博客我们总结了spring基础、spring分别整合struts2、hibernate、mybatis等,今天我们来同时整合下 struts、spring、hibernate,也就是所谓的 ssh 。 整合流程: 1 首先整合...
部署Web应用请按如下步骤进行: 1. 进入auction路径下,将mysql.sql脚本中的语句导入MySQL数据库。 2. 修改auction\WEB-INF路径下的...(struts2权威指南一书经我改编,简单的SSh整合框架注册系统)
3,在web.xml中配置 spring 的 OpenSessionInView 过滤器(解决抛LazyInitializationException的问题) 1,配置 <!-- 配置 spring 的 OpenSessionInView 过滤器 --> <filter-name>OpenSessionInView ...
Spring4.0和_Hibernate4.0加上_Struts2.3整合的配置文件
org.springframework.web-x.x.x.RELEASE.jar:在web.xml中配置启动Spring容器所需,包括上下文和监听器。 Struts2相关的jar包: Struts2的核心库,如struts2-core-x.x.x.jar。 以及其他与Struts2相关的库,例如用于...
管那么多开始学就这样,,注意的部分...web.xml,applictionContent.xml,,其中有一部分是我用来测试的..有的可能不够好.大家将就一下吧...有问题问我咯... /* MySQL Data Transfer Source Host: localhost Source ...
在web.xml的display-name标签与welcome-file-list标签中加入一下代码 struts2 org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter struts2 /* org.springframework.web.context....
在web.xml中配置struts <filter-name>struts2 <filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter <filter-name>struts2 <url-pattern>/* 在web.xml配置spring <!-- ...
然后去网上下载 最新的ssh jar包,覆盖调 web-info\lib\的所有jar包。 因为myeclipse 里的版本可能继承的是很老的包,所以建议在网上下最新的。 第一步,配置struts ,跟原来的配置一样,唯一不同的是。 scope...
jar包 包括: struts2 - spring3 - hibernate3 - mysql5.x 3个配置文件: web.xml struts.xml application.xml文件基本配合
介绍了SSH与jfreechart 整合的XML配置和 整合方法。。。