Return-Path: Mailing-List: contact commons-user-help@jakarta.apache.org; run by ezmlm Delivered-To: mailing list commons-user@jakarta.apache.org Received: (qmail 85942 invoked from network); 15 Mar 2003 19:22:54 -0000 Received: from dsl081-059-059.sfo1.dsl.speakeasy.net (HELO phane.xephyrus.com) (64.81.59.59) by daedalus.apache.org with SMTP; 15 Mar 2003 19:22:54 -0000 Received: from xephyrus.com (localhost [127.0.0.1]) by phane.xephyrus.com (Postfix) with SMTP id 991368C06B; Sat, 15 Mar 2003 11:22:58 -0800 (PST) Received: from 192.168.59.116 (SquirrelMail authenticated user xephyrus) by www.opencdpress.com with HTTP; Sat, 15 Mar 2003 11:22:58 -0800 (PST) Message-ID: <41992.192.168.59.116.1047756178.squirrel@www.opencdpress.com> Date: Sat, 15 Mar 2003 11:22:58 -0800 (PST) Subject: Re: [fileupload] access to non-file-related parameters? From: "Xephyrus" To: In-Reply-To: <20030314205537.O60592@icarus.apache.org> References: <41969.192.168.59.116.1047702424.squirrel@www.opencdpress.com> <20030314205537.O60592@icarus.apache.org> X-Priority: 3 Importance: Normal X-MSMail-Priority: Normal Cc: X-Mailer: SquirrelMail (version 1.2.6) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N >> For example, if I have an upload form that accepts the filename to >> upload (via a normal file-type input tag) and a description of that >> file (via a textarea, let's say), there's no way to retrieve the >> description. > > The parseRequest() method returns a list of *all* the parameters in the > request. In the case you describe, there would be two items in the > list, one for the uploaded file and another for the description. You > can access the text of your description with something like this: > > if (item.isFormField() && "description".equals(item.getFieldName())) > { > String description = item.getString(); > // Do what you want with the description. > } Ah, I had been wondering about that isFormField method. Thanks. . Topher