Hi Stephen,

I read your comments with interest.


> What alternatives are there to session scoped beans?  One could use hidden
> variables to pass along simple data items, but that becomes awkward for
> storing lots of fields, or whole objects, as you have to unpack them in
the
> JSP and pack them back up in the next Action.  Perhaps there could be some

Our application is made from many wizard-type dialogs; instead of storing
the action form bean in the session, we decided to have it stored in the
request only, and propagate it from form to form (the steps of the wizard)
using the technique you describe of serializing the form bean to a hidden
field.

All the work is done by a subclass of ActionServlet, resulting in "clean
pages" -- identical to ones using a session-stored form bean. It's really
easy to use. Overall I feel like it's a valid approach, but heavy in terms
of processing: the form bean is serialized/deserialized at every request.
I'm starting to think your "sub-session" scope could be a better approach.


Regarding the scope issue, we also try to organize the (otherwise flat)
action namespace by naming the actions according to the stuff they do, and
where they are called. E.g. in a wizard "downloadSoftware", a sample step
(and the corresponding action) is named
"/downloadSoftware/enterProxyParams.do". The ordering of the steps, and how
they relate to each other, is done solely inside struts-config.xml.


--Renaud


Reply via email to