Use request.getParameterValues("cmboId") to return an array of values.  You
can then use a for-loop to iterate through the values.

-----Original Message-----
From: Divya M A [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 31, 2000 4:15 PM
To: [EMAIL PROTECTED]
Subject: ASP to JSP conversion


Hi!
      I have a basic question regarding ASP to JSP conversion. I have a
statement in ASP as shown below:
            for each item in request.Form("cmboId")
                tmpAdd =3D tmpAdd + item
            next
    Here, cmboId is the name of a control array each of which has an integer
value(like, 1,2,3 etc.).
    I'm not able to find the appropriate statement to convert this 'for'
statement to JSP. Tried using a JScript syntax : for (item in .....), but
that doesn't seem to work. Also, thought of getting the length of  the
control-array being passed(cmboId), to loop through for fetching  each item
in it, but that too fails. Also, I found that this array is passed as a
String. I'm wondering how to proceed.
Regards

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

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

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

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to