\" />
define a String variable using the JSP tags
<%! String test = new String(); %>
then refer to that variable in your loop as
test+= whaterver_value