`
zgzd13575java
  • 浏览: 13805 次
  • 性别: Icon_minigender_1
  • 来自: 深圳
社区版块
存档分类
最新评论

OpenSessionInView

    博客分类:
  • SSH
阅读更多
<!--web.xml处加入-->
<!-- OpenSessionmInView过滤器 -->
<filter>
<filter-name>OpenSessionInViewFilter</filter-name>
<filter-class>
org.springframework.orm.hibernate3.support.OpenSessionInViewFilter
</filter-class>
</filter>
<filter-mapping>
<filter-name>OpenSessionInViewFilter</filter-name>
<url-pattern>*.do</url-pattern>
</filter-mapping>

<!-- 装载spring上下文 -->
<listener>
<listener-class>
org.springframework.web.context.ContextLoaderListener
</listener-class>
</listener>

<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>
/WEB-INF/classes/applicationContext.xml
</param-value>
</context-param>

SSH整合时,struts-config忽加入

<!-- Spring上下文插件 -->
<plug-in
className="org.springframework.web.struts.ContextLoaderPlugIn">
<set-property
value="/WEB-INF/classes/applicationContext.xml,/WEB-INF/classes/action-servlet.xml"
property="contextConfigLocation" />
</plug-in>
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics