How to create Struts Drop down List? -


I am new to struts

I want to add drop down to the web page. That drop down should have four values The default and the first value will be (select).

I want to continue the selected value, when that form is opened again and when submitting, if the user does not choose any value from the drop down (meaning that the default value is present) I Do not allow the user to submit a warning unless the user selects an option from the dropdown.

An action. Java, Form.Java, Javascript file and jsp file. In action. Java, I agree to use ArrayList to keep separate drop down values. How can this be done please help me

  & lt; S: select list = "# {'': 'Select', 'key1': 'value1', 'key2': 'value2'}" key = "selectedValue" & gt; & Lt; / S: Select & gt;   

Or do you have a list object (id, value)

  & lt; S: select key = "selectedValue" list = "yourlists" headerKey = "" header value = "list" list = "id" list value = "value" />    

Comments