We are new to struts in our company and are currently designing a web
application. In our design, we would like to incorporate best practices
using the Struts framework.  Specifically related to:

1> Setting attributes/parameters for the next form in the navigation
mapping--  What is the best practice here?
                (a)-Set the form attributes for the next form within the
current form. Instantiate the next form and set it's attributes prior to
forwarding the request--however, we would have to have knowledge of the next
form in the navigation and dynamically instantiate it.
                                -OR-
        (b)-Retrieve the values from the previous form in the current form

2> Using collections (vectors, etc.) of business objects for manipulation
within a form (display/update):
                (a) Does a collection of business objects have to be an
attribute of the form using it, or should it just be set as a
request/session Attribute which the form using its values can retrieve from
the request/session objects.  The actual attributes associated with the
objects within the collection will be part of the form, but does the actual
collection also have to be part of the form (define get/set methods, etc..).
For example, if we have a User Object (name, address, etc..) and we would
like to be able to display / update multiple users on a form, we would have
a form variable of type String [] for name and address.  As we
populate/retrieve the values of these string arrays, their respective User
Objects will be set and updated.  Does the Collection of User Objects have
to be part of the form?  We would like to use the "iterate" tag for
processing of the Collection within the JSP. 

Thanks in advance for anyone's view on Struts best practices.

Reply via email to