Hi Ruimo, 

If not mistaken i think we might need this

<bean ..... scope="request">
...
    <aop:scoped-proxy />
...
</bean>

rgds


Ruimo Uno <[EMAIL PROTECTED]> wrote: Hi,

I'm trying Spring2 with Struts2 but cannot configure request scoped bean.
I've changed web.xml along with the folowing guide:

http://www.opensymphony.com/webwork/wikidocs/Spring%20Session%20Components%20Workarounds.html

  
    requestContextFilter
    org.springframework.web.filter.RequestContextFilter
  

  
    requestContextFilter
    /*
  

Then added a request scoped bean in the applicationContext.xml.

  
        init-method="init" destroy-method="terminate" scope="request">
  

However, the application fails throwing the following exception.

org.springframework.beans.factory.BeanCreationException: Error creat
ing bean with name 'userAction' defined in ServletContext resource [/WEB-INF/app
licationContext.xml]: Cannot resolve reference to bean 'userDao' while setting b
ean property 'userDao'; nested exception is org.springframework.beans.factory.Be
anCreationException: Error creating bean with name 'userDao': Scope 'request' is
 not active; nested exception is java.lang.IllegalStateException: No thread-boun
d request: use RequestContextFilter

Any idea?

-- 
Ruimo Uno
(Shisei Hanai)

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



                
---------------------------------
 Now you can scan emails quickly with a reading pane. Get the new Yahoo! Mail.

Reply via email to