Z
Zane
Hi,
I am new to using the JSTL library and have a quick question that I
cannot find the qnswer to. Basically I have a form that is posted to a
JSP page which basically needs to print out the parameters passed to
it in the request. Where I am having trouble is that I am using the
forEach tag to iterate which prints out unique keys fine, but it when
it comes to checkboxes with the same key it only prints out the first
check box instead of all of them. For example say the JSP was passed
the following request header via a GET method:
chess.jsp?piece=pawn&piece=rook&piece=queen
and the jsp has the following code:
<c:forEach items="${param}" var="chessPiece">
<cut value"${chessPiece.value}" />
</c:forEach>
the output is just:
pawn
instead of:
pawn rook queen
What am I missing?
Thanks,
Zane
I am new to using the JSTL library and have a quick question that I
cannot find the qnswer to. Basically I have a form that is posted to a
JSP page which basically needs to print out the parameters passed to
it in the request. Where I am having trouble is that I am using the
forEach tag to iterate which prints out unique keys fine, but it when
it comes to checkboxes with the same key it only prints out the first
check box instead of all of them. For example say the JSP was passed
the following request header via a GET method:
chess.jsp?piece=pawn&piece=rook&piece=queen
and the jsp has the following code:
<c:forEach items="${param}" var="chessPiece">
<cut value"${chessPiece.value}" />
</c:forEach>
the output is just:
pawn
instead of:
pawn rook queen
What am I missing?
Thanks,
Zane