Return-Path: Mailing-List: contact struts-dev-help@jakarta.apache.org; run by ezmlm Delivered-To: mailing list struts-dev@jakarta.apache.org Received: (qmail 10067 invoked from network); 4 Oct 2000 17:39:20 -0000 Received: from mercury.sun.com (192.9.25.1) by locus.apache.org with SMTP; 4 Oct 2000 17:39:20 -0000 Received: from taller.eng.sun.com ([129.144.252.34]) by mercury.Sun.COM (8.9.3+Sun/8.9.3) with ESMTP id JAA28802 for ; Wed, 4 Oct 2000 10:35:32 -0700 (PDT) Received: from eng.sun.com (florence [129.144.251.146]) by taller.eng.sun.com (8.9.3+Sun/8.9.3/ENSMAIL,v1.7) with ESMTP id JAA11390 for ; Wed, 4 Oct 2000 09:50:12 -0700 (PDT) Message-ID: <39DB6007.C748CA49@eng.sun.com> Date: Wed, 04 Oct 2000 09:51:19 -0700 From: "Craig R. McClanahan" X-Mailer: Mozilla 4.75 [en]C-CCK-MCD {Sony} (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: struts-dev@jakarta.apache.org Subject: Re: References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Spam-Rating: locus.apache.org 1.6.2 0/1000/N Larry Kim wrote: > hi , > > The action.xml file has a mysterious attribute called "inputForm". > what is the meaning of this attribute? I have put values in "inputForm" and > deleted them, and my application seems to work the same with our without > this attribute being present. > Ah, it is a little bit obtuse, isn't it? :-) One of the other attributes you set is formClass, which tells Struts the Java class name of your form bean. If your bean implements the ValidatingActionForm interface (instead of just ActionForm), Struts does the following additional processing before calling your action: * Populates the form bean properties as usual * Calls the validate() method of your form bean * If there are any errors, redirects to the URL indicated by the inputForm attribute (which is normally the address where the form came from). If your form bean does not implement ValidatingActionForm, there is no change in behavior with or without the inputForm attribute. But if it does, you've got an easy mechanism for server-side validation of the input data, before bothering to execute your action. Craig McClanahan ==================== See you at ApacheCon Europe ! Session VS01 (23-Oct 13h00-17h00): Sun Technical Briefing Session T06 (24-Oct 14h00-15h00): Migrating Apache JServ Applications to Tomcat