struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Toni Lyytikäinen" <tol...@gmail.com>
Subject Re: [S2] how to configure Spring's OpenViewInSessionInterceptor for struts2
Date Mon, 09 Jul 2007 17:28:42 GMT
I took a look at that, but it's not actually written for Struts but for
WebWork 2.x and the AroundInterceptor class it extends is not included in
Struts 2. I don't know what that page is doing in Struts documentation,
since it won't even compile with vanilla Struts 2.

On 7/9/07, panpan <xiili@yahoo.com> wrote:
>
>
> Thank you a lot! Toni. That answer cleared my question.
>
> Have you noticed there is Non-IoC version of OpenSessionInViewInterceptor
> in
> the Apache Struts 2 Documents. Please click the below link:
>
>
> http://struts.apache.org/2.x/docs/non-ioc-version-of-opensessioninviewinterceptor.html
>
> I don't know if this one work?
>
>
>
> Toni Lyytikäinen wrote:
> >
> > Sorry, I must have read the post too quickly and assumed you were
> talking
> > about the filter, because I haven't really seen a working OSIV
> interceptor
> > for Struts 2. If you want to use an interceptor, you'll probably have to
> > write one yourself for Struts 2. I don't think the one in Spring can be
> > configured to work with the interceptor stack in Struts 2 because it's
> so
> > heavily tied to Spring interfaces and concepts.
> >
> > On 7/9/07, panpan <xiili@yahoo.com> wrote:
> >>
> >>
> >> 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 <xiili@yahoo.com> 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: user-unsubscribe@struts.apache.org
> >> >> For additional commands, e-mail: user-help@struts.apache.org
> >> >>
> >> >>
> >> >
> >> >
> >>
> >> --
> >> 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: user-unsubscribe@struts.apache.org
> >> For additional commands, e-mail: user-help@struts.apache.org
> >>
> >>
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/-S2--how-to-configure-Spring%27s-OpenViewInSessionInterceptor-for-struts2-tf4050042.html#a11505610
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message