<%--
 Copyright 2004 Sun Microsystems, Inc. All rights reserved.
 SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
--%>

<%@ taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt" %>
<fmt:setBundle basename="LocalStrings"/>

<html>
<!--
  Copyright (c) 1999 The Apache Software Foundation.  All rights 
  reserved.
-->

<body bgcolor="white">
<font size=5 color="red">
<%! String[] fruits; %>
<jsp:useBean id="foo" scope="page" class="samples.webapps.simple.beans.checkbox.CheckTest" />

<jsp:setProperty name="foo" property="fruit" param="fruit" />
<hr>
<fmt:message key="checkresult.jsp.checkedfruits"/> <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>
<br>
<hr>

<fmt:message key="checkresult.jsp.checkedfruitsbeans"/> <br>

<% 
		fruits = foo.getFruit();
%>
<ul>
<%
    if (!fruits[0].equals("1")) {
	  for (int i = 0; i < fruits.length; i++) {
%>
<li>
<%
		  out.println (fruits[i]);
	  }
	} else out.println ("none selected");
%>
</ul>
</font>
</body>
</html>