Laine Donlan wrote:
> All -
>
> I was wondering if anyone had experience with Struts as it relates to
> managing the amount of objects created by the Framework. I am
> relatively new to Struts as well as jsp development and would appreciate
> any pointers or 'things to keep in mind' to avoid resources being
> wasted.
>
Of the objects related to the framework itself, I would make the following
suggestions:
* Struts supports form beans in either request scope or session
scope. If your form is all on one page, and the bean has properties
for every form field, request scope avoids having the form beans
hang around in memory between requests (but, on the other hand,
this requires Struts to create a new one on each form submit).
* For form beans (or application beans in general) that you store in
the user's session, be sure to clean up after yourself by calling
session.removeAttribute() when you no longer need a bean.
The remaining objects in the Struts framework are either created once and
shared, or managed for you automatically.
>
> Thanks in advance.
>
> Laine
Craig McClanahan