struts2中action失去选中的checkbox的值

struts2中action得到选中的checkbox的值struts2中得到checkbox的值:action中得到的是一个字符串,用,隔开

struts2中action得到选中的checkbox的值

struts2中得到checkbox的值:

action中得到的是一个字符串,用","隔开。所以在action中定义一个属性值接收checkbox的name,然后拆串即可。

html:

?action:


action:
       已经封装了checkname。
       String ck= this.getCheckname();  
       System.out.println(ck);