Hi Lukasz,

thank you on this example. One question, is this going to work with this
Struts 2 + Spring 2 + JPA + AJAX application from Struts 2 docs, i.e., I
don't need to change code ?

--
Thx, Milan


Lukasz Lenart wrote:
> 
>> I see that I can use OpenSessionInViewFilter, just I now need some
>> example
>> for this kind of application.
> 
> Example:
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <web-app xmlns="http://java.sun.com/xml/ns/j2ee";
>   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; version="2.4"
>   xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
> http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd";>
> 
>   <context-param>
>     <param-name>contextConfigLocation</param-name>
>     <param-value>/WEB-INF/classes/application-context*.xml</param-value>
>   </context-param>
> 
>   <context-param>
>     <param-name>webAppRootKey</param-name>
>     <param-value>app.webroot</param-value>
>   </context-param>
> 
>   <context-param>
>     <param-name>log4jConfigLocation</param-name>
>     <param-value>/WEB-INF/classes/log4j.properties</param-value>
>   </context-param>
> 
>   <filter>
>     <filter-name>openSessionInView</filter-name>
>    
> <filter-class>org.springframework.orm.hibernate3.support.OpenSessionInViewFilter</filter-class>
>   </filter>
> 
>   <filter>
>     <filter-name>encodingFilter</filter-name>
>    
> <filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
>     <init-param>
>       <param-name>encoding</param-name>
>       <param-value>UTF-8</param-value>
>     </init-param>
>     <init-param>
>       <param-name>forceEncoding</param-name>
>       <param-value>true</param-value>
>     </init-param>
>   </filter>
> 
>   <filter-mapping>
>     <filter-name>openSessionInView</filter-name>
>     <url-pattern>/*</url-pattern>
>   </filter-mapping>
> 
>   <filter-mapping>
>     <filter-name>encodingFilter</filter-name>
>     <url-pattern>/*</url-pattern>
>   </filter-mapping>
> 
>   <listener>
>    
> <listener-class>org.springframework.web.util.Log4jConfigListener</listener-class>
>   </listener>
> 
>   <listener>
>    
> <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
>   </listener>
> 
> </web-app>
> 
> 
> Regards
> -- 
> Lukasz
> http://www.lenart.org.pl/
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/LazyInitializationException-with-Struts-2-%2B-Spring-2-%2B-JPA-%2B-AJAX-application-tp18155823p18157069.html
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