I'm using struts-2 with Spring. In struts-2, we inject the user input directly to the bean from JSP and creating private member of that Bean in Action Class. After that, We create Model class by writing code like
After that we call required model Methods.
But using springs, No need to create "new" simply by registering all classes in applicationContext.xml. Can I inject user-inputs from applicationContext.xml to bean instead of bean directly? If can't, Then spring's used only to create new instance of Model with dependency injection?
First I've to do as usual like injecting directly to Bean from jsp, then to create only model instance, I've to use spring? What's the use of BEAN? I know bean is a POJO we can send bean to different layers without problems (like object passing without depending on any of the layers/frameworks, But in this case how? We are not passing anything, applicationcontext.xml is doing all the things. Please clarify my doubts step by step.
posted 6 years ago
Can anybody explain this CODE properly.. I'm not getting what's happening inside please... OR Explain how struts2 - Spring Integration works step by step...
I dint understand the struts-2/spring control flow according to the standard MVC. Controller is blackbox it transfers to struts.xml, but in that blackbox we specify the spring listener class. I want to know the control flow. I saw that link. But, dint satisfy. When spring.xml will get trigger and after it initializes the bean, where the control flow goes ? interceptors triggers before spring.xml or after? Please provide or explain step by step process and control flow in spring/struts-2 integration.
Please do not shoot the fish in this barrel. But you can shoot at this tiny ad:
Devious Experiments for a Truly Passive Greenhouse!