Developing Struts application With diff. types of form components in the form page:-
Resource of application:-
- Details.JSP (form page)
- DetailsForm.Java (formbean class)
- DetailsAction.Java (action class)
- Result.jsp (result page)
- Struts-config.xml (Struts config file)
- The select box that allows to select multiple items is called as list box.
- When items in select box, list box are selected and radio button, check boxes are selected then their labels will not go to server as request parameter values. The values of their respective value attributes will go to server as request parameter values.
- When check box is not selected, no item of list box is selected then they will not send their request parameters to server. So the related setxxx () methods in form bean class will be not be executed. Whereas the remaining form components send default values (empty Strings) as request parameter values even though they are not filled up with values or not selected.
- While working with Struts environment of form page having checkbox, list box and of form bean scope is Session scope the following problem may raise. I.e these two components related form bean properties may show selected state values even though they not selected in the form page.