• Post Reply Bookmark Topic Watch Topic
  • New Topic

accessing beans, declared in spring-config.xml  RSS feed

 
omkar patkar
Ranch Hand
Posts: 231
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Guys,

I am using Struts 1.2.8 and spring2.0. I declare my beans in the spring-config.xml file which is loaded into the memory when the server is started. Now if in action class i want to access a bean already instantiated in the memory when the xml file was loaded. Can any one tell me which class in spring i can use for this purpose ?

Many thanks in advance.
mkar Patkar
 
Herman Schelti
Ranch Hand
Posts: 387
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi Omkar,

a small example from the book Pro Spring (chapter 19)



You won't even need this if you declare your Struts Actions as Spring Beans

Herman
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!