Return-Path: Delivered-To: apmail-struts-user-archive@www.apache.org Received: (qmail 20354 invoked from network); 29 Sep 2010 07:02:46 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 29 Sep 2010 07:02:46 -0000 Received: (qmail 57983 invoked by uid 500); 29 Sep 2010 07:02:44 -0000 Delivered-To: apmail-struts-user-archive@struts.apache.org Received: (qmail 57644 invoked by uid 500); 29 Sep 2010 07:02:40 -0000 Mailing-List: contact user-help@struts.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: 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 57636 invoked by uid 99); 29 Sep 2010 07:02:39 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 29 Sep 2010 07:02:39 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of hareendras@gmail.com designates 74.125.82.54 as permitted sender) Received: from [74.125.82.54] (HELO mail-ww0-f54.google.com) (74.125.82.54) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 29 Sep 2010 07:02:31 +0000 Received: by wwi17 with SMTP id 17so496142wwi.35 for ; Wed, 29 Sep 2010 00:02:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:content-type; bh=GmMKmzEfPVMTkXi/i0bbkPjvpVlw8e+EpFtXHthXhK8=; b=pdKqXUxv4ZuI9SqZuS4fowg4fSxOXgrDLJ50mds/JbKIO4R/hu07aitlMhjGia35ZY Mxvsr93uEHSVX9yNmjF3/03k0OTeIpy6YY73pRABJk6hNTCfFaoTjUR0+BNWSogB/ngV EzMwzNUIY7Wy/MyM0ScNm6AB7ZlH1OlK4CVFg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=MSprSdJmO0570/NRpxj5ZTEEJ7vgzQrU3xI6KxU2M2TX9ZBKuh3coBoIzfpTlXXruy cs2Xd9osjbrWnPx0Ewt0kFiR/vrLWpUEc/8hcYuhENEeCgs0hmwzyvQPDCaaixsyFJwL wWUh1qLM9EBIAjGoL+VymOC0PsNyJQ0NdV58c= MIME-Version: 1.0 Received: by 10.216.35.77 with SMTP id t55mr2136642wea.0.1285743730970; Wed, 29 Sep 2010 00:02:10 -0700 (PDT) Received: by 10.216.230.32 with HTTP; Wed, 29 Sep 2010 00:02:10 -0700 (PDT) In-Reply-To: References: Date: Wed, 29 Sep 2010 12:32:10 +0530 Message-ID: Subject: Re: Accessing User input in execute ( ) method From: hareendra seneviratne To: Struts Users Mailing List Content-Type: multipart/alternative; boundary=0016367fa6605b50d80491608acc X-Virus-Checked: Checked by ClamAV on apache.org --0016367fa6605b50d80491608acc Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable Hi Thank u all for ur replies. This is my next step... Here is the source of one of my model classes, Officer public class Officer { private String id; private String error =3D null; private Set *totalExcessSet* =3D new HashSet(); ......... In my execute() method I have an Officer Instance. I want to iterate through *totalExcessSet *property of this instance within my view. How am I gonna do this?? Many thanks again On Wed, Sep 29, 2010 at 5:23 AM, serge nana wrote: > Hareendra, > > You don't need to have an ActionForm in order to invoke an Action class. = An > ActionForm is a data transfer object (DTO) that allows you to transfer da= ta > from the view to the controller( in this case your action). So, if you wa= nt > to use struts and you have a form to send to the server, i recommend you = to > use ActionForm. > > In the big picture though, an Action class is a Servlet sub-class. Just > like > you can retrieve variables from the request object inside a doXXXX method= , > so you can do the same inside the *execute()* method by calling > request.getParameter("param_name"). > > Hope this helps. > > "Don't rely on luck to find a bug." > > > On Mon, Sep 27, 2010 at 5:24 AM, hareendra seneviratne < > hareendras@gmail.com > > wrote: > > > Hi all, > > > > > > > > I=92m new to struts and getting to know it. > > > > > > > > Is it mandatory to have an ActionForm? Can we access the variables > defined > > in *view* from *execute()* method without using an ActionForm? > > > > > > > > Thnks for ur replies J > > > --0016367fa6605b50d80491608acc--