<%@ include file="../demoUtil.jsp" %> <%! String[] fruits; %>
The checked fruits (got using request) are:
<% fruits = request.getParameterValues("fruit"); if (fruits != null) { for (int i = 0; i < fruits.length; i++) { fruits[i] = util.HTMLReplace(fruits[i]); } } %>
    <% if (fruits != null) { for (int i = 0; i < fruits.length; i++) { %>
  • <% out.println (fruits[i]); } } else out.println ("
  • none selected"); %>


The checked fruits (got using beans) are
<% fruits = foo.getFruit(); %>
    <% if (fruits != null) { for (int i = 0; i < fruits.length; i++) { %>
  • <% out.println (fruits[i]); } } else out.println ("
  • none selected"); %>