aspose file tools*
The moose likes Other Application Frameworks and the fly likes Spring bean in strutsAction Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Other Application Frameworks
Bookmark "Spring bean in strutsAction" Watch "Spring bean in strutsAction" New topic
Author

Spring bean in strutsAction

Rudradutt Joshi
Ranch Hand

Joined: Dec 06, 2008
Posts: 45

Hi,

Thank you for your time,
I want to use a spring bean in struts action, that is all ready being initialized when the container starts. I had tried to get it with static applicationcontext, but it also initializes spring applicationContext second time. I also don't think its an efficient way.


Regards,
Rudradutt Joshi.
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17250
    
    6

Spring has a special class called ActionSupport, which extends Struts Action class, but adds the functionality to get the Spring App Context. Just have your action classes extend that class.

For more info, you can go to the Springframework.org documentation page, or do a google search on "Spring ActionSupport" and I am sure you will find more information.

Good Luck, it is very simple to use, I am sure you will have no problems with it.

Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Spring bean in strutsAction