Thank you Toni for your example.
I'm just wondering about the OpenViewInSessionInterceptor. Don't know how to
configure it in struts2.

Thanks again!



Toni Lyytikäinen wrote:
> 
> I can't really say about Spring 1.2.8 because I've only ever used 2.0, but
> here's what I did:
> 
> in web.xml:
> 
> <web-app>
> <filter>
>   <filter-name>OSIVFilter</filter-name>
>   <filter-class>
> org.springframework.orm.hibernate3.support.OpenSessionInViewFilter
> </filter-class>
> </filter>
> ...
> <filter-mapping>
>   <filter-name>OSIVFilter</filter-name>
>   <url-pattern>/*</url-pattern>
> </filter-mapping>
> <filter-mapping>
>   <filter-name>struts2</filter-name>
>   <url-pattern>/*</url-pattern>
> </filter-mapping>
> <listener>
>   <listener-class>org.springframework.web.context.ContextLoaderListener
> </listener-class>
> </listener>
> <context-param>
>   <param-name>contextConfigLocation</param-name>
>   <param-value>/WEB-INF/applicationContext*.xml</param-value>
> </context-param>
> ..
> </web-app>
> 
> Of course you also need to have your (Hibernate) SessionFactory set in
> Spring's applicationContext-file.
> 
> 
> On 7/9/07, panpan <[EMAIL PROTECTED]> wrote:
>>
>>
>> I'm new to Spring and Struts2 and currently working on an existing
>> project(Spring 1.2.8+ struts+hibernate 3) which is upgrading to struts2.
>> Need to add OpenViewInSessionInterceptor to the project to enalbe the
>> lazy
>> loaing in the presentation layor. I've searched the forum and didn't get
>> the
>> answer.
>>
>> I would appreciate any inputs.
>>
>> --
>> View this message in context:
>> http://www.nabble.com/-S2--how-to-configure-Spring%27s-OpenViewInSessionInterceptor-for-struts2-tf4050042.html#a11503872
>> Sent from the Struts - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
> 
> 

-- 
View this message in context: 
http://www.nabble.com/-S2--how-to-configure-Spring%27s-OpenViewInSessionInterceptor-for-struts2-tf4050042.html#a11504395
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to