hi all,
I have problems getting my radio type input named "mgender". I've tried
the getName and setName but they don't seemed to work because there are at
least two values for such a type. I've tried another method of which the
bean is:
package mye;
public class CheckTesta {
String b[] = new String[] { "1", "2", "3", "4" };
public String[] getFruit() {
return b;
}
public void setFruit(String [] b) {
this.b = b;
}
}
and the .jsp file is:
<%! String[] fruits; %>
<jsp:useBean id="foo" scope="page" class="mye.CheckTesta" />
<jsp:setProperty name="foo" property="fruit" param="fruit" />
<hr>
The checked fruits (got using request) are: <br>
<%
fruits = request.getParameterValues("fruit");
%>
<ul>
<%
if (fruits != null) {
for (int i = 0; i < fruits.length; i++) {
%>
<li>
<%
out.println (fruits[i]);
}
} else out.println ("none selected");
%>
</ul>
but it still does not work. Any idea why ?
Sincerely,
brenda
===========================================================================
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