In the project, you need to get the Id set selected in the checkbox from the previous page, so Alex is in a hurry.
Finally, I used dynamic actionform bean to solve the problem. I have not studied how to solve static beans. It should not be a problem.
The general structure is:
JSP page:
<Input type = "checkbox" name = "stids" value = "<Bean: write name =" category "property =" ID "/>
Formbean:
Use Dynamic actionform. The configuration file is as follows:
<Form-bean name = "testingform" type = "org. Apache. Struts. Action. dynaactionform">
<Form-property name = "istids" type = "Java. Lang. Long []"/>
........
</Form-bean>
Action:
Public actionforward execute (actionmapping mapping, actionform form,
Httpservletrequest request, httpservletresponse response)
Throws exception {
Dynaactionform LS-DYNA = (dynaactionform) form;
Long [] IDs = (long []) LS-DYNA. Get ("stids ");
Haha, so you can get it ,~~~