I have a  struts app in which I use an action (say action A) to pass a 
bean (Bean A) containing data from the Model  as an attribute  in the 
request scope to a View ( JSP A).
JSP A contains a Form that initiates Action B ( simply a Submit button) 
and thus  on to View B(JSP B) after some more interaction with the Model.
What I would like to do is re-use Bean A in Action B, as it contains data 
pertinent to Action B, and I don't want to query the model again for the 
same data.
How can I do this keeping the data bean A in the request scope? I know I 
can achieve this by placing Bean A in  the session scope, but this will 
accumulate memory and cause potential synchronization problems accross 
multiple users.

The real life scenario is this- Action A is selecting Patient cases from a 
database corresponding to a date range, and displaying the Case list  data 
(Bean A) in a table (JSP A) . The next task is to display all the pharmacy 
bills for the set of cases defined in Bean A and shown in JSP A.  So I 
would like to pass Bean A to the next Action B, which would forward the 
caselist  to a helper bean,  which in turn  would query the Model for all 
the drugs used for all the patients defined in Bean A. The end result is a 
list of pharmacy Bills (View B) which would print out  as all the bills 
for patients in a date range defined by the selection started by Action A.

Any help gratefully received.

Reply via email to