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

 <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>

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

 <bean id="userDao" class="dao.DummyUserDao"
       init-method="init" destroy-method="terminate" scope="request">
 </bean>

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]

Reply via email to