-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Rapsy,

rapsy wrote:
> Also, is there any other better approach to prepopulate the drop down list?
> Should I just make call to database from jsp page.

You should have an action whose job it is to setup the request for this
kind of thing. Consider this setup:

request -> setup action -> display JSP

The setup action fetches your (static) data from the database and
puts it into the request attributes.

Your JSP uses that data from the request scope to populate the drop-down.

Submit your page to your "submit action", but set the "input" attribute
of that <action> to the setup action above instead of the JSP. This way,
you always get your states in the drop-down, even if the form fails
validation.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFF0fx89CaO5/Lv0PARAp35AJ9yDKbMG0YWASKwLS2IreaX5BbCYQCfaqeq
GJ5nYtH7qVrHaPapSs7PObc=
=Jjjx
-----END PGP SIGNATURE-----

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

Reply via email to