为什么要自己写呢?
用struts的不是很好吗?
1.
form:
private boolean[] names = new boolean[10];
get...
set...
记得在reset中重置names
2.
jsp
<html:checkbox property="names[i]" />