> I'm trying to create a form with some pre-filled which either > come from a > cookie or a database. i browsed the archive and found a > comment from Craig > where he says the best way to do this is by routing the > specified request > into a action and populate the form there. IMHO this way > would complicate > the Actions execute method unnecessary complicat cause it must have a > "action-case" for "prepopulate".
Depends on what you mean by "complicate." If you are adhering to the MVC model, your form beans will be pretty simple, with no data access functionality within it. Data access should happen in an action servlet which prepopulates the form bean as necessary. One of the benefits of this is cleanly separating functionality: if your data access method ever changes you will only need to change the action, or whichever class is responsible. The flow should go something like this: 1) Action creates & populates form bean 2) Action forwards to JSP 3) JSP (using <html:form> tag) populates form elements appropriately -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

