Even if you don't write a reset method, the ActionForm's reset method is called on every request. Your only option (that I'm aware of) is to override it:
public void reset(ActionMapping mapping, HttpServletRequest request) {} This will cause reset to do nothing and all your values will remain in tact. If you need a means of clearing these out, you'll have to add another method that you can call from Action1, for example: public void clearForm() { property1 = null; //etc..... } This is because Struts always calls reset on every request, regardless of bean scope. ----- Original Message ----- From: "Goldy J" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Friday, August 01, 2003 8:18 AM Subject: Re: Formbean Scope > Thanks a lot David for the prompt reply . Iam actually not using reset method. I > have couple of text fields and combobox in JSP2 which I need to prepopulate from > JSP1. Do you still recommend using reset or there is any other way. If you can refer > to any working example it would be great. > Thanks > > David Chelimsky <[EMAIL PROTECTED]> wrote: > Try overriding reset() such that it doesn't do anything. Otherwise, the > reset() method in ActionForm will set all primitives to their defaults and > all objects to null. > > > ----- Original Message ----- > From: "Goldy J" > To: > Sent: Friday, August 01, 2003 7:20 AM > Subject: Formbean Scope > > > > Hello, > > I have JSP1 from which I go to JSP2. The JSP2 should come prepopulated > with some values that I set in action class associated with JSP1. I am > using the same formbean for both JSP 1 and JSP 2. I set the value that I > need in JSP2 in Action class1 and I can see they are getting set in the > formbean. But when JSP2 open the get method shows value as null. In action > mapping the scope is session. > > I suppose that Iam losing the formbean when the JSP2 opens ..is there a > way out ? > > Pls. help > > > > Thanks > > > > > > --------------------------------- > > Do you Yahoo!? > > SBC Yahoo! DSL - Now only $29.95 per month! > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > > --------------------------------- > Do you Yahoo!? > SBC Yahoo! DSL - Now only $29.95 per month!