You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Stephan Jones <st...@businesstrax.com> on 2004/04/27 20:56:03 UTC

Changing formBeans from session to request scope - need a little guidance

I am mulling over whether I should make the effort to convert my session
scoped ActionForms to request scoped.

I originally did this because I have a few lists in some forms that populate
drop down lists.
Now from what I have researched it does seem possible to scope these as
“request” with a little rework.

Unfortunately I have not found a good example.

My questions are:
1.	Does it really make a difference if the bean is scoped as “session” ?
2.	How do I implement that with in my current actionForm?


Application Specific stuff:
I do not use DynactionForms
I use Velocity as my template engine

ActionForn snippet
<snip>
public final class CategoryForm extends ValidatorForm implements
Serializable {

// ------------------------------------------------------ Instance Variables
    /** String representaiton of the category Label displayed on forms */
    private String categoryLabel = null;
    /** String representaiton of the category name */
    private String categoryName = null;
    /** ArrayList of Role Objects for this Category */
    private ArrayList categoryRoles;
</snip>

All getter,setter methods exist.