SSH中OpenSessionInViewFilter中部分失效原因

当lazy="true"时,会出现以下错误,

could not initialize proxy - no Session

大概意思就是session已经关闭,

 

很多博客都说设lazy="FALSE"时就没事~

 

顶小孩都知道

 

后来找到

 

<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>*.do</url-pattern>
    
</filter-mapping>

 

,还是报错

 

有跑了一次谷歌,

原来这段是要放到struts Filter前面的~~!我顶

 

 

posted on 2011-05-11 01:57  sin  阅读(582)  评论(0编辑  收藏  举报

阳江人才网