posted 15 years ago
As I mentioned before, your idea of passing other objects to the execute method simply isn't going to work. Aside from restrictions in Struts, you also have the restriction that you're passing data to and from the HTTP layer.
The obvious solution is just to store these value objects in the HTTPSession. If you do this, you have access to the object from any Action class anywhere along the line.
In my view, the HTTPSession has gotten an undeserved bad reputation. Developers have read white papers warning against the dangers of over-using the HTTPSession, and have taken that to mean that one should never use the HTTPSession. In today's application servers, a reasonable amount of data can be stored in an HTTPSession without incurring any significant performance hit.
If you're adamantly opposed to using the HTTPSession for these objects, the next best thing would be to declare these objects as properties of your ActionForm bean. That way they get passed along with the ActionForm.
[ June 19, 2008: Message edited by: Merrill Higginson ]