Hi, Thank you for your response. It seems like Preparable is for Struts 2. I am using Struts 1.3.8. Any ideas for Struts 1.x?
Regards, Amrinder Sandhu On Sun, Nov 9, 2008 at 3:51 PM, Burton Rhodes <[EMAIL PROTECTED]>wrote: > You need to have your action object implement Preparable (and perhaps > ModelDriven depending on your implementation) and set your action > member variables (or bean) in the Prepare method. If there are > validation errors, this method will take care of your issue before > that error is recognized and since the 'execute' method won't be > called. > > On 11/9/08, Amrinder Sandhu <[EMAIL PROTECTED]> wrote: > > Hi, > > > > I have an ExecuteTest action which returns a view. The action also sets > up > > some beans that the view will use to display data to the user. The view > also > > contains a form. Everything works when I go to the action, which shows me > > the view. The page contains the data from the beans and the textbox > inside > > the form tag. If I enter valid data into the texbox and hit submit, > > everything works great. But if I leave the textbox empty or type in > invalid > > data, I should get back error messages from the validate method of the > form. > > But instead I get a HTTP 500 error message saying Cannot find bean in any > > scope. I see why I get this error message, but I can't seem to fix it. > > > > How can I have that bean be set again if the validation fails? This seems > > like a common issue, but did not find anything using google. Thanks in > > advance. > > > > Regards, > > Amrinder > > > > -- > Sent from my mobile device > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >