Richard, Thanks for the suggestion. An action is already defined in struts-config.xml with two 'forward' definitions - 'success' and 'failure'. Is there an 'initialize' forward?
Richard Yee <[EMAIL PROTECTED]> wrote: It is because the action class execute method is only executed when the form is submitted, not when it is displayed. If you want to pre-load the form, you need to create an action and either forward or redirect to the action which then forwards to the page that displays the form. -Richard At 11:12 AM 1/5/2005, you wrote: >I have a form that needs some initialization. The form is derived >from DynaValidatorForm and its properties are defined in struts- >config.xml. I initialize an attribute in the 'execute' method of >my 'Action' class. For some reason when the servlet container >creates the page for the first time, the Struts servlet does not call >the 'execute' method and consequently there is no attribute >initialization. When I hit the 'submit' button, the 'execute' method >is called and the attribute is initialized correctly. I think that >the problem is somewhere in re-direction, but I don't know where. >Can anyone suggest why the 'execute' is never called before the >initial display of the form? > >--------------- >Eli Segev > > > > > >--------------------------------------------------------------------- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------- Do you Yahoo!? The all-new My Yahoo! – What will yours do?