you can.t definite String[] name in the method setName
it.s local variable.

----- Original Message -----
From: "Erwin Dwight V. Ruiz" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, July 24, 2002 10:53 AM
Subject: Re: Form Processing


> thanks for the reply but i still have one more problem.
> i tried to set as what you've said as a
> String array but the values that i retrieved was null.
> here is my code:
>
> public void setName(String[] values){
>   String[] name=new String[values.length];
>   for(int i=0;i<values.length; i++){
>      name[i]=values[i];
>   }
> }
>
> public String[] getName(){ return name; }
>
> thanks. :)
>
> On Tue, 23 Jul 2002, Hans Bergsten wrote:
>
> > Erwin Dwight V. Ruiz wrote:
> > > Hello I'm new to jsp and i'd like to know
> > > how multiple text boxes or form elements
> > > with the same name can be processed in a
> > > jsp application. if the names of the form elements
> > > are unique you could easily map the elements to a
> > > java bean through accessor and setter methods. what
> > > happens if the form elements name are not
> > > unique can we still map the elements to a
> > > java bean? if possible how do i do it?
> >
> > You can capture them in a bean with a setter method that takes an
> > array:
> >
> >    setMyProperty(String[] values)
> >
> > Hans
> > --
> > Hans Bergsten           [EMAIL PROTECTED]
> > Gefion Software         http://www.gefionsoftware.com
> > JavaServer Pages        http://TheJSPBook.com
> >
> >
===========================================================================
> > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
> > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
DIGEST".
> > Some relevant FAQs on JSP/Servlets can be found at:
> >
> >  http://archives.java.sun.com/jsp-interest.html
> >  http://java.sun.com/products/jsp/faq.html
> >  http://www.esperanto.org.nz/jsp/jspfaq.jsp
> >  http://www.jguru.com/faq/index.jsp
> >  http://www.jspinsider.com
> >
>
> --
>
>
===========================================================================
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
> For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
DIGEST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
>  http://archives.java.sun.com/jsp-interest.html
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.jsp
>  http://www.jguru.com/faq/index.jsp
>  http://www.jspinsider.com
>

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com

Reply via email to