I have a situation in which I have to change the scope from "request" to "session" in the action class. How could i get this functionality. I know that if i try to use the setScope method, i would get the error "configuration is freezed". What is the alternate way to achieve this. Any ideas
"Failure is not when you fall down; its only when you fail to get up again."
Sounds to me like he is asking how to change the scope of the action specified in the struts-config.xml. However, I am with you Jeanne. I am not sure what he is trying to do exactly or why. Maybe a bit more information about the scenerio would help.
I want to set the actionform into session scope due to some specific application requirements at some point in the action class. As you said I can copy from request to session, I tried it but didn't work for me.
This is my form bean which is in request scope at action level
It would have got the details if the actionForm was in session scope. If I originally put the actionForm into session scope in struts-config.xml file, there are some other aspects which i have to take care and that is problamatic for me.
I have tried to put the actionForm into session in this way:
session.setAttribute("newReservationForm",newFormObj); and I hope the struts tags should be able to find the actionForm , which it is not doing.
Once the scope is set in struts-config u cant change as this will be loaded when the server is started....but even if use the trick of setting the bean in that particular scope u should use the tags by compulsorily saying scope="session/request" if u dont give this the way strust looks up is first applictaion/session/request and so conflict may happen .To avoid all this duplicate ur bean and put it in session/req with different name rather than the same ..........still u can use the struts tags