Summarize the case of using the drop-down box on the Web to get the data list from the database, put the data into the request ("AliST", there is 2 properties (String ID, String Value) 1. Using JSTL Foreach 'SELECTED =" SELECTED "> < / option> c: by>
// the list can be a form.
F.setagelist (alist);
1. Get data from the database, you should put the data in the request in the action
2. After the data is taken out, put it in a list or collection or map, I am used to using List
3. Take data from List or other containers should use or
4. and The outer layer must be , so you must define in the Formbean
5. Since you have to use these tags, you must define FORMBEAN
6.
Take data from Action, take List as an example
List list = xxxxx; // Get data from the drop-down list from the database
Request.setttribute ("List", List);
Display on the page
... html: select> ... html: form>