Return-Path: Delivered-To: apmail-struts-user-archive@www.apache.org Received: (qmail 70665 invoked from network); 8 May 2005 13:57:45 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 8 May 2005 13:57:45 -0000 Received: (qmail 77255 invoked by uid 500); 8 May 2005 14:00:20 -0000 Delivered-To: apmail-struts-user-archive@struts.apache.org Received: (qmail 77241 invoked by uid 500); 8 May 2005 14:00:19 -0000 Mailing-List: contact user-help@struts.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Struts Users Mailing List" Reply-To: "Struts Users Mailing List" Delivered-To: mailing list user@struts.apache.org Received: (qmail 77218 invoked by uid 99); 8 May 2005 14:00:19 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (hermes.apache.org: local policy) Received: from tomts36-srv.bellnexxia.net (HELO tomts36-srv.bellnexxia.net) (209.226.175.93) by apache.org (qpsmtpd/0.28) with ESMTP; Sun, 08 May 2005 07:00:19 -0700 Received: from [192.168.0.2] ([65.94.92.176]) by tomts36-srv.bellnexxia.net (InterMail vM.5.01.06.10 201-253-122-130-110-20040306) with ESMTP id <20050508135716.EPDV16985.tomts36-srv.bellnexxia.net@[192.168.0.2]> for ; Sun, 8 May 2005 09:57:16 -0400 Message-ID: <427E1ACB.2080405@aladin.ca> Date: Sun, 08 May 2005 09:57:31 -0400 From: Aladin Alaily User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.2) Gecko/20040804 Netscape/7.2 (ax) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Struts Users Mailing List Subject: Re: Session Scope-Form Bean Reset Method Executing Every Request References: <20050508120940.55181.qmail@web54708.mail.yahoo.com> <427E192E.8080704@cyberspaceroad.com> In-Reply-To: <427E192E.8080704@cyberspaceroad.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Hi Mehmet, The reset method of your form bean will be executed every time it passes through the controller on a redirect, which is handled as a new request. As such, if you do not want to have the reset method called you should forward your pages rather than redirecting them (I don't think this is a good idea for forms). An alternative, if you want to use redirect (which I would recommend to circumvent the form-resubmit prompt on reload or when navigating with the browser's back button), is to set your formbean in the session and reset it manually (when needed). Hope this helps, Aladin Adam Hardy wrote: > On 08/05/05 13:09 Mehmet E. wrote: > >> Form Bean scope is session. In every request form bean >> RESET method is executing. I am useing struts with >> tiles. There is no code for removing form bean from >> session. As i know, it must execute one times per >> session after creation of form bean. > > > Mehmet, I never used the formbean in session scope but I'm guessing that > reset is triggered once per request. > > Logically the alternative request-scope form-bean needs no reset() > method, therefore the reset method must specifically exist to be > executed on session-scope formbeans on every request. > > Someone correct me if I'm wrong - if you wanted you could check quickly > in the struts source code. > > > Adam > --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@struts.apache.org For additional commands, e-mail: user-help@struts.apache.org