`
junjun16818
  • 浏览: 104316 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

SSH 整合 web.xml

阅读更多

<?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整合包及配置文件.rar

    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整合配置文档

    ssh 整合所有配置文件的配置 各个标签如何填写 Struts2.xml配置文档 &lt;?xml version="1.0" encoding="UTF-8" ?&gt; &lt;!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.1//EN" ...

    一个非常简单的SSH整合

    struts2+hibernate4+spring3的整合 步骤:a. 创建数据库表 userinfo b. 创建web工程,导入支持 c. 数据库表反向工程 d.向上推 jsp --&gt; action --&gt; service --&gt; dao --&gt; db e.配置spring 的...

    自定义PROXOOL监听器整合SSH框架

    1、proxool官网,下载最新的proxool-0.9.1.jar ...4、整合Struts2、Spring和proxool,配置Web服务启动配置文件[web.xml] 5、整合Spring和proxool,配置应用上下文配置文件[applicationContext.xml]

    ssh代码生成器轻松、快捷

    程序配置 --&gt; web.xml 验证框架--&gt; bean-validation.xml (实体验证)、SaveAction-validation.xml (保存验证)、UpdateAction-validation.xml (修改验证) 日志管理配置 --&gt; log4j.xml 国际化配置-&gt;globalMessages_zh....

    AutoCode代码生成器【SSH版】

    程序配置 --&gt; web.xml 验证框架--&gt; bean-validation.xml (实体验证)、SaveAction-validation.xml (保存验 证)、UpdateAction-validation.xml (修改验证) 日志管理配置 --&gt; log4j.xml 国际化配置--...

    ssh整合的常用配置文件,包括所有配置文件,需要的童鞋进行下载。

    ssh这个是常用的配置文件,里面包含hibernate.cfg.xml\struts.xml\beans.xml\log4j.properties\web.xml等等,是开发必备的配置文件

    AutoCode代码生成器(SSH版)

    程序配置 --&gt; web.xml 验证框架--&gt; bean-validation.xml (实体验证)、SaveAction-validation.xml (保存验证)、UpdateAction-validation.xml (修改验证) 日志管理配置 --&gt; log4j.xml 国际化配置--&gt;...

    struts2+spring+hibernate整合示例

    SSH整合示例(详情见我博客专栏)之前的博客我们总结了spring基础、spring分别整合struts2、hibernate、mybatis等,今天我们来同时整合下 struts、spring、hibernate,也就是所谓的 ssh 。 整合流程: 1 首先整合...

    SSH整合框架注册登录系统

    部署Web应用请按如下步骤进行: 1. 进入auction路径下,将mysql.sql脚本中的语句导入MySQL数据库。 2. 修改auction\WEB-INF路径下的...(struts2权威指南一书经我改编,简单的SSh整合框架注册系统)

    OA项目SSH整合框架

    3,在web.xml中配置 spring 的 OpenSessionInView 过滤器(解决抛LazyInitializationException的问题) 1,配置 &lt;!-- 配置 spring 的 OpenSessionInView 过滤器 --&gt; &lt;filter-name&gt;OpenSessionInView ...

    Spring4.0_Hibernate4.0_Struts2.3整合配置文件

    Spring4.0和_Hibernate4.0加上_Struts2.3整合的配置文件

    Java整合SSH框架

    org.springframework.web-x.x.x.RELEASE.jar:在web.xml中配置启动Spring容器所需,包括上下文和监听器。 Struts2相关的jar包: Struts2的核心库,如struts2-core-x.x.x.jar。 以及其他与Struts2相关的库,例如用于...

    ssh2整合,struts2.hibernate,spring

    管那么多开始学就这样,,注意的部分...web.xml,applictionContent.xml,,其中有一部分是我用来测试的..有的可能不够好.大家将就一下吧...有问题问我咯... /* MySQL Data Transfer Source Host: localhost Source ...

    企业人力资源管理项目SSH+EXT+MySQL+MD5

    在web.xml的display-name标签与welcome-file-list标签中加入一下代码 struts2 org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter struts2 /* org.springframework.web.context....

    SSH第7章上机.zip ACCP8.0

    在web.xml中配置struts &lt;filter-name&gt;struts2 &lt;filter-class&gt;org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter &lt;filter-name&gt;struts2 &lt;url-pattern&gt;/* 在web.xml配置spring &lt;!-- ...

    j2ee SSH 整合笔记,献于新手。。

    然后去网上下载 最新的ssh jar包,覆盖调 web-info\lib\的所有jar包。 因为myeclipse 里的版本可能继承的是很老的包,所以建议在网上下最新的。 第一步,配置struts ,跟原来的配置一样,唯一不同的是。 scope...

    SSH2-mini框架整合

    jar包 包括: struts2 - spring3 - hibernate3 - mysql5.x 3个配置文件: web.xml struts.xml application.xml文件基本配合

    SSH与jfreechart整合

    介绍了SSH与jfreechart 整合的XML配置和 整合方法。。。

Global site tag (gtag.js) - Google Analytics