Return-Path: Delivered-To: apmail-jakarta-tomcat-user-archive@jakarta.apache.org Received: (qmail 4411 invoked by uid 500); 16 Jul 2001 16:34:55 -0000 Mailing-List: contact tomcat-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk Reply-To: tomcat-user@jakarta.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list tomcat-user@jakarta.apache.org Received: (qmail 4402 invoked from network); 16 Jul 2001 16:34:54 -0000 Received: from f191.law14.hotmail.com (HELO hotmail.com) (64.4.21.191) by h31.sny.collab.net with SMTP; 16 Jul 2001 16:34:54 -0000 Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Mon, 16 Jul 2001 09:34:30 -0700 Received: from 198.161.183.25 by lw14fd.law14.hotmail.msn.com with HTTP; Mon, 16 Jul 2001 16:34:30 GMT X-Originating-IP: [198.161.183.25] From: "Sean Tiley" To: tomcat-user@jakarta.apache.org Bcc: Subject: RE: Ordering of parameters in HTTPRequest Object Date: Mon, 16 Jul 2001 12:34:30 -0400 Mime-Version: 1.0 Content-Type: text/plain; format=flowed Message-ID: X-OriginalArrivalTime: 16 Jul 2001 16:34:30.0520 (UTC) FILETIME=[2FFB8780:01C10E15] X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N Thank you all for your input / suggestions on my form field ordering problem. I will have to think about a solution (though the hidden field idea is pretty good) Sean Tiley >From: "Deacon Marcus" >Reply-To: tomcat-user@jakarta.apache.org >To: >Subject: RE: Ordering of parameters in HTTPRequest Object >Date: Mon, 16 Jul 2001 15:47:47 +0200 > >Hi, > > > -----Original Message----- > > From: Michael Wentzel [mailto:Michael.Wentzel@aswethink.com] > > Sent: Monday, July 16, 2001 2:39 PM > > To: 'tomcat-user@jakarta.apache.org' > > Subject: RE: Ordering of parameters in HTTPRequest Object > > > > > > > Hello all, I am new to this mailing list, and Tomcat, so please pe > > > patient... > > > > > > I am using Servlets to recieve html form submissions. > > > > > > Problem is that the form fields are in a particular order on > > > the form, but > > > when I get the Parameters from the request object this field order is > > > gone... > > > > > > The post data comes in in the proper order, but I can not recover the > > > ordering. If it was only 1 form I was dealing with, I could > > > write code to > > > format a response, but the app is very generalized, and it is > > > designed to > > > handle many different forms. > > > > > > So the question. Is there no way in tomcat to preserve the > > > ordering of > > > parameters from a form submission? > > > > No. This is servlet API thing, not a tomcat thing. I think it's a bad > > idea to develop servlet to depend on the order in which a request object > > is formed because you never know for sure that an ordering is going to > > be fixed. For example, say a hashing algorithm is used for speed up > > access. How do you order the elements of a hash table? The only thing > > I could suggest is preface every form element with its' order, 1st >element > > would be 0_elementname and 9th element would be 8_elementname, then >order > > the elements yourself, but I think this is kind of sloppy. > >Maybe provide another hidden field in your form specifing order (type="hidden" name="field-order" value="f1,f2,f3" > or something), then add >a filter (assuming you use T4.0/S2.3) prividing custom Request adding >methods for getting other fields by numbers. > > > > > > > --- > > Michael Wentzel > > Software Developer > > Software As We Think - http://www.aswethink.com > >Greetings, > deacon Marcus > _________________________________________________________________________ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.