Struts2 Value Stack
Posted
by
vipul12389
on Stack Overflow
See other posts from Stack Overflow
or by vipul12389
Published on 2012-07-02T13:41:00Z
Indexed on
2012/07/05
3:16 UTC
Read the original article
Hit count: 133
struts2
I want to understand Struts 2 value stack vs request scope. I want the struts2 value stack to work same as request scope.
for e.g. i have invoked action1 in struts 2, the action performs some db task and gets back. it performs some operation on a object called cases (type Cases, where Cases is bean class with getters and setters). cases object is declared at class level.
action1 led a view to be rendered say jsp1.
jsp1 again has some action called as action2. action2 leads to the same java file as of action1 but has different method.
Now, i want to access the object which was used in action1. during action1 cases was pushed to Value Stack and was accessed on jsp1.
I simply tried accessing its getter methods, but it returns a null value....!!
any solution on how to do ??? or is it possible ?? i know if its possible then what is the difference between vs and request scope...
© Stack Overflow or respective owner