function say() {
var p = "";
$("input:checkbox[name=‘checks‘]:checked").each(function() {
p += $(this).val() + ",";
});
$("#atype").val(p);
var se = "";
$("select option:selected").each(function() {
if ($(this).val() == "") {
se +=",";
} else if ($(this).val() == "1") {
se += "<" + ",";
} else {
se += $(this).val() + ",";
}
});
$("#options").val(se);
}
<input type="hidden" name="atype" id="atype" value="" /> <input
type="hidden" name="options" id="options" value="" />
String columns[] = null;
String atype = request.getParameter("atype");
String column = atype.substring(0, atype.lastIndexOf(","));
columns = column.split(",");