if you need to populate a form, you can do in one action
and then forward to jsp, why you need to pre-populate ??

"Curtney Jacobs" <[EMAIL PROTECTED]> escribió en el mensaje
news:[EMAIL PROTECTED]
> Greetings everyone!
>
>
> I would like to preopulate serveral forms with default values retrieve
from a
> database upon application startup or after a successful login by the user.
>
> I have an approach in mind, however, I am not sure if it is the most
efficient
> or best approach. My approach is to use a filter that creates and stores
in
> memory default ActionForms. The ActionForm will contain default values for
> select fields (or any other fields) retrieved from a database. The
> ActionForms will be stored within the current user session and then
controll
> will be given over to Struts ActionServlet.
>
>
> Another similar approach would be to register a listerner
> (HttpSessionAttributeListener) that would essentially  wait for a specific
> attribute to be added into the session (i.e SETUP_FORMS) then it would
query
> the database for neccessary application setup data.
>
>
> I read the message archive, and a few have suggested calling a "setup
action"
> per request that prepopulates the default values in the ActionForm. This
is a
> valid approach, but IMHO only for small applications. It just seems that
> there will be to much "traffic" going on between the app and the database.
> Correct me if I am wrong.
>
> If you have gotten this far please share your thoughts on this topic.
>
> Curtney




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to