SSH中web.xml文件的配置
来源:互联网 发布:ucloud云计算工资怎样 编辑:程序博客网 时间:2024/06/02 08:12
Struts:
如果是2.1.3之前的版本,用org.apache.struts2.dispatcher.FilterDispatcher,否则,用org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter。 从Struts2.1.3开始,将废弃ActionContextCleanUp过滤器,而在StrutsPrepareAndExecuteFilter过滤器中包含相应的功能
1 <!-- Struts2 filter --> 2 <filter> 3 <filter-name>struts2CleanupFilter</filter-name> 4 <filter-class>org.apache.struts2.dispatcher.ActionContextCleanUp</filter-class> 5 </filter> 6 7 <filter> 8 <filter-name>struts2Filter</filter-name> 9 <filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>10 </filter>
如果程序报类找不到异常,且后面有 org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter 等信息,可能是你的版本问题.解决方法是确定你的struts版本, 如果是2.1.3之前的版本,用 org.apache.struts2.dispatcher.FilterDispatcher,以后的版本则配置org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter
ActionContextCleanUp的作用:http://blog.csdn.net/xingxing1909/article/details/7843587
1 <filter-mapping> 2 <filter-name>struts2CleanupFilter</filter-name> 3 <url-pattern>/*</url-pattern> 4 <dispatcher>REQUEST</dispatcher> 5 <dispatcher>FORWARD</dispatcher> 6 </filter-mapping> 7 8 <filter-mapping> 9 <filter-name>struts2Filter</filter-name>10 <url-pattern>/*</url-pattern>11 <dispatcher>REQUEST</dispatcher>12 <dispatcher>FORWARD</dispatcher>13 </filter-mapping>
Hibernate:
1 <!-- Hibernate Open Session In View filter -->2 <filter>3 <filter-name>hibernateOpenSessionInViewFilter</filter-name>4 <filter-class>org.springframework.orm.hibernate3.support.OpenSessionInViewFilter</filter-class>5 </filter>
作用:http://mimimao0901.iteye.com/blog/1388692
Spring:
1 <!--Spring ApplicationContext配置文件的路径,可使用通配符,多个路径用,号分隔此参数用于后面的Spring Context 2 Loader -->3 <context-param>4 <param-name>contextConfigLocation</param-name>5 <param-value>classpath*:/applicationContext.xml</param-value>6 </context-param>
1 <!--Spring的ApplicationContext 载入 --> 2 <listener> 3 <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> 4 </listener> 5 6 <!-- Spring 刷新Introspector防止内存泄露 --> 7 <listener> 8 <listener-class>org.springframework.web.util.IntrospectorCleanupListener</listener-class> 9 </listener>10 11 <!-- session超时定义,单位为分钟 -->12 <session-config>13 <session-timeout>30</session-timeout>14 </session-config>
转载自: http://www.cnblogs.com/sunxucool/archive/2012/12/05/2803024.html
0 0
- SSH中web.xml文件的配置
- ssh中web.xml文件配置备份
- SSH整合中web.xml的配置
- SSH配置中web.xml的要点
- ssh项目中,对于spring的bean.xml和web.xml文件的基本配置
- SSH中 applicationcontext.xml与web.xml的配置
- 关于SSH框架整合中web.xml文件的配置详解
- ssh的web.xml配置
- ssh的web.xml文件
- [SSH框架初学笔记]web.xml文件的基本配置
- ssh整合!Struts.xml、hibernate与spring整合的applicationContext.xml、web.xml文件的配置!
- ssh整合中web.xml配置模版
- SSH框架中web.xml配置
- SSH框架中applicationContext.xml文件的配置
- SSH配置:web.xml
- SSH web.xml配置
- SSH web.xml配置
- SSH web.xml配置
- 急停拉绳开关优质供应
- 来了!
- 好的产品经理是什么样的?
- setInterval 和setTimeout的停止方法
- 基于Jquery的可拉拽控件的实现
- SSH中web.xml文件的配置
- 搜集过的牛X文章
- 简单区分iphone和ipad的宏定义
- android浏览器研究-loadUrl加载流程
- Linux 解压命令
- iOS:事件处理机制(二)--事件传递,Responder Chain响应链
- 光电传感器厂家
- 你们不懂的
- linux c语言实现队列及用于生产者消费者模型