I'd grab the struts source and use your debugger. Put a breakpoint where you get your NPE. You should then be in a pretty good position to figure what you've done wrong with your code. The Struts source is generally easy to understand and pretty well commented.
HTH, Paul > -----Original Message----- > From: Andrew Close [mailto:[EMAIL PROTECTED] > Sent: Friday, July 30, 2004 5:21 PM > To: Struts > Subject: pulling dynamic data out of a form... > > > hi all, > > i'm having a hard time getting data from multiple textfields with > similar names out of a form and into my actionform. > in my JSP i'm using a [logic:iterate] tag to display (up to) ten > textfields. these textfields are initially empty. the user enters > data into the text fields and hits 'add', and i get an > IndexOutOfBoundsException. this exception isn't occuring in my code, > but i'm sure it's due to something i'm doing (or not doing) in my > code. > my action form has a Collection variable named itms that is an > ArrayList. the getter returns a Collection and the setter takes an > array of Strings, iterates through them and puts them into the > ArrayList. although i never get to that point. > i'm sure that my actionform is to blame and whatever Struts does > behind the scenes to populate my actionform is blowing up. > > i've looked at a couple of Ted Husteds articles (most notably: Use an > array to capture multiple parameters) but they don't seem to deal with > getting data out of the page form and into the action form. i've also > tried to search the mailing list archives but i keep getting the > message 'Text search not available for this list'... > > any pointers or suggestions on correctly setting up an actionform to > retrieve data from textfields that were built with an iterator? > > thanks > andy > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > ********************************************************************** Axios Email Confidentiality Footer Privileged/Confidential Information may be contained in this message. If you are not the addressee indicated in this message (or responsible for delivery of the message to such person), you may not copy or deliver this message to anyone. In such case, you should destroy this message, and notify us immediately. If you or your employer does not consent to Internet email messages of this kind, please advise us immediately. Opinions, conclusions and other information expressed in this message are not given or endorsed by my Company or employer unless otherwise indicated by an authorised representative independent of this message. WARNING: While Axios Systems Ltd takes steps to prevent computer viruses from being transmitted via electronic mail attachments we cannot guarantee that attachments do not contain computer virus code. You are therefore strongly advised to undertake anti virus checks prior to accessing the attachment to this electronic mail. Axios Systems Ltd grants no warranties regarding performance use or quality of any attachment and undertakes no liability for loss or damage howsoever caused. ********************************************************************** --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]