Hi All,
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.
Thanks:
Ramakrishna K.C