By default, Struts places your form bean in session scope.  This means
everytime you bring up the form using this bean, it'll have the values
entered the last time it was used.  You can put your forms in request scope
so that Struts will start with a new form bean instance everytime a form
needs that form bean.

--- Brian Boyle <[EMAIL PROTECTED]> wrote:
> Hubert, thanks fo ryour reply. As I explained to Rudiger earlier, I am 
> farily new to Struts so please excuse my lack of knowledge! Would you be 
> able to explain to me how I put my form bean into the request scope, and 
> what difference does this make form putting it into the session scope?
> 
> Regards,
> 
> Brian
> 
> 
> >From: Hubert Rabago <[EMAIL PROTECTED]>
> >Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> >To: Struts Users Mailing List <[EMAIL PROTECTED]>
> >Subject: Re: Clearing Input fields
> >Date: Wed, 5 May 2004 08:55:31 -0700 (PDT)
> >MIME-Version: 1.0
> >Received: from mail.apache.org ([208.185.179.12]) by mc12-f21.hotmail.com 
> >with Microsoft SMTPSVC(5.0.2195.6824); Wed, 5 May 2004 08:56:02 -0700
> >Received: (qmail 34974 invoked by uid 500); 5 May 2004 15:55:38 -0000
> >Received: (qmail 34917 invoked from network); 5 May 2004 15:55:38 -0000
> >Received: from unknown (HELO web60207.mail.yahoo.com) (216.109.118.102) 
> by 
> >daedalus.apache.org with SMTP; 5 May 2004 15:55:38 -0000
> >Received: from [139.72.1.30] by web60207.mail.yahoo.com via HTTP; Wed, 05 
> >May 2004 08:55:31 PDT
> >X-Message-Info: JGTYoYF78jHYu+6AY36t9IQuMkKg29GR
> >Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm
> >Precedence: bulk
> >List-Unsubscribe: <mailto:[EMAIL PROTECTED]>
> >List-Subscribe: <mailto:[EMAIL PROTECTED]>
> >List-Help: <mailto:[EMAIL PROTECTED]>
> >List-Post: <mailto:[EMAIL PROTECTED]>
> >List-Id: "Struts Users Mailing List" <user.struts.apache.org>
> >Delivered-To: mailing list [EMAIL PROTECTED]
> >Message-ID: <[EMAIL PROTECTED]>
> >In-Reply-To: <[EMAIL PROTECTED]>
> >X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N
> >Return-Path: [EMAIL PROTECTED]
> >X-OriginalArrivalTime: 05 May 2004 15:56:03.0989 (UTC) 
> >FILETIME=[782ED450:01C432B9]
> >
> >Brian,
> >
> >Aside from putting your form bean in request scope, you really don't need 
> >to
> >do anything special to clear the form when a new form is being shown.
> >Javascript certainly isn't required to clear it.  Try it out and mail back
> 
> >if
> >just putting it to request scope doesn't work as you expected.
> >
> >Hubert
> >
> >--- Brian Boyle <[EMAIL PROTECTED]> wrote:
> > > Hi guys!
> > >
> > > I was wonderng if anyone could help me with aporblem I have. I input 
> >data
> > > into my input fields on my JSP page. If I press reset the fields are
> > > cleared. I press submit and my ActoinForm reads the data in and my 
> >Action
> > > processes it etc.... However, when I return to this page again the same
> > > data
> > > is still there in hte input fields. When I press my reset button
> nothing
> > > happens. I want to be able to return to the page again and the fields
> be
> > > cleared. I don't want to see the same ddata in them.
> > >
> > > Any ideas on how to do this?
> > >
> > > Thanks for your help
> > >
> > > Brian
> > >
> > > _________________________________________________________________
> > > MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*.
> > > http://join.msn.com/?page=features/virus
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> >
> >
> >
> >
> >
> >__________________________________
> >Do you Yahoo!?
> >Win a $20,000 Career Makeover at Yahoo! HotJobs
> >http://hotjobs.sweepstakes.yahoo.com/careermakeover
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> >
> 
> _________________________________________________________________
> MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. 
> http://join.msn.com/?page=features/virus
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 



        
                
__________________________________
Do you Yahoo!?
Win a $20,000 Career Makeover at Yahoo! HotJobs  
http://hotjobs.sweepstakes.yahoo.com/careermakeover 

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

Reply via email to