Hi,

I have actually found a solution in Spring docs. You need to put spring 
RequestContextFilter before t5 filter, like this:

  <filter>
    <filter-name>requestContextFilter</filter-name>
    
<filter-class>org.springframework.web.filter.RequestContextFilter</filter-class>
  </filter>

  <filter-mapping>
    <filter-name>requestContextFilter</filter-name>
    <url-pattern>/*</url-pattern>
  </filter-mapping>


It is working now, so no JIRA issue needed.



________________________________
From: Howard Lewis Ship <hls...@gmail.com>
To: Tapestry users <users@tapestry.apache.org>
Sent: Wednesday, 4 February, 2009 22:44:30
Subject: Re: T5 - spring integration

Scope 'session' is not active for the current thread

looks like a Spring exception; seems like its wanting some per-thread
setup.  That's easy enough to do, I just haven't used Spring @Scope
before and I didn't know about it. If you could add a JIRA Issue, with
pointers to the appropriate Spring documentation, I can take care of
that.

On Wed, Feb 4, 2009 at 1:37 PM, Damir Bijuklic <damirbijuk...@yahoo.com> wrote:
> Hi,
>
> i would like to share some state objects between tapestry pages and spring 
> controllers (mainly login data).
> My naive first approach is to create session scoped object in spring and 
> access it from both sides, unfortunately it is to naive...
>
> In spring i use @Component and @Scope("session") annotations on state object.
> In tapestry i use @Inject and @Service("sharedData") annotations.
>
> When I try accesing object from tapestry side i get
>
> ComponentEventException Error creating bean with name 
> 'scopedTarget.sharedData': Scope 'session' is not active for the current 
> thread;
>
>
> What is recommended practice for sharing such data, if that is possible. I 
> would like to avoid using external storage like database for various reasons 
> including simplicity and performance.
>
> I have read somewhere that T5.1 supports injecting tapestry objects into 
> spring beans. Should I try that?
> I don't mind if it is still work in progress so the exact api might change a 
> bit until it is final.
>
>
> PS
> This is the first project I'm using T5 and as expected it is so much more fun 
> than T4.
> I really love live class reloading, almost like coding in a scripting 
> language but with access to all those refactorings.
> Thank you Howard!
>
>
> Damir
>
>
>



-- 
Howard M. Lewis Ship

Creator Apache Tapestry and Apache HiveMind

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org


      

Reply via email to