Sometimes there is a need to pass a collection of values from HTML from to server. To achieve that a list of parameters with the same name is used. In our sample form we use a set of checkboxes with the same name.

A collection of parameteres may be accessed through the expression ${}, where name is the name of the parameter you're looking for. The result of such expression contains all these values.

In our tip all the checkbox parameters have the same value for the name attribute: feedback. Users can choose as many check boxes as they feel are appropriate, and the expression ${} will contain a collection of all the parameters

A form with checkbox parameters:

<form method="post" action="checkbox.jsp">
		Please check adjectives you would
		use to describe this web site's
		customer service:
	<p>Atrocious <input type="checkbox" name="feedback" 
	                value="atrocious"/> </p>
	<p>Loathsome <input type="checkbox" name="feedback" 
	<p>Flagitious <input type="checkbox" name="feedback" 
	<p>Satisfactory<input type="checkbox" name="feedback" 
	<p><input type="submit" value="Submit" /></p>
////////////// a page to handle checkbox parameters:

<%@ taglib prefix="c" uri="" %>


////////////// Decides if there are any feedback params"

	<c:when test="${not empty}">
		You described our customer service as
			<c:forEach items="${}" var="adj">
				<li><c:out value="${adj}"/></li>

		You didn't choose any feedback checkboxes.