• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Spring + struts2 DI problem

 
Sam Venkata
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am using spring xml file to do DI into STRUTS2 Action classes. I need to inject the dependency for each request to the action class. I wanted to if it is possible. I have tried it, but the setter method is called only at the time of container startup and not for every invocation of the action class.
The bean in spring xml file looks like this



I tried setting the scope of the bean to prototype but that did not work either.

Could somebody please tell me if I am missing something.

Thanks,
Samanth.
[ March 26, 2008: Message edited by: Samanth Marisetty ]
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm not clear about what the problem is, but do you know that there's also a "request" scope in Spring 2.0 ?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic