How to share data between action components in a struts application
Hi Guys,
I am stuck. I have set up my application using
the struts framework. I have an
Account class and a helper class Account Manager. I am storing my data in an
array of Account in Account Manager. So, in the create Action component I create
a new account in the account array. In the login Action component I am trying
to access the account using userid. The lookup method is in the Account Manager
class along with the array of Account. In order to use the lookup method from
the login Action I have to instantiate the Account Manager in the login Action
component. But when I instantiate in the login Action, does that not
instantiate the array of account that I have created the new account in? I
don't know how to set up the data and its associated methods so that all Action
components can access it.
I am not sure if I have explained my problem clearly to you. How can all of my
Action components access the array of Account that I am updating with new
accounts? Hope you guys can help. Thanks
|