File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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

Spring bean in strutsAction

Rudradutt Joshi
Ranch Hand

Joined: Dec 06, 2008
Posts: 45


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.

Rudradutt Joshi.
Mark Spritzler

Joined: Feb 05, 2001
Posts: 17276

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


Perfect World Programming, LLC - iOS Apps
How to Ask Questions the Smart Way FAQ
I agree. Here's the link:
subject: Spring bean in strutsAction
jQuery in Action, 3rd edition