JSP
UpdatePermissionForm update
=
(UpdatePermissionForm)form;
ArrayList userList
=
new
ArrayList();
userList.add(
new
LabelValueBean(
"
haha
"
,
"
1
"
));
userList.add(
new
LabelValueBean(
"
dada
"
,
"
2
"
));
userList.add(
new
LabelValueBean(
"
xiaoxiao
"
,
"
3
"
));
![](https://i-blog.csdnimg.cn/blog_migrate/4f1150b881333f12a311ae9ef34da474.gif)
request.setAttribute(
"
userList
"
, userList);
System.out.println(update.getUser());//结果输出为1,2,3
<
html:form action
=
"
/updatePermission.do
"
method
=
"
post
"
>
< html:select name = " updatePermissionForm " property = " user " style = " width:152px " >
< html:optionsCollection name = " userList "
label = " label " value = " value " />
</ html:select >
< html:submit ></ html:submit >
</ html:form >
form
< html:select name = " updatePermissionForm " property = " user " style = " width:152px " >
< html:optionsCollection name = " userList "
label = " label " value = " value " />
</ html:select >
< html:submit ></ html:submit >
</ html:form >
/**
用户类型
*/
private String user = "" ;
/** 用户类型列表 */
private List userList = null ;
getter(
.)
setter(
.)
action
private String user = "" ;
/** 用户类型列表 */
private List userList = null ;
getter(
![](https://i-blog.csdnimg.cn/blog_migrate/9b8a8a44dd1c74ae49c20a7cd451974e.gif)
setter(
![](https://i-blog.csdnimg.cn/blog_migrate/9b8a8a44dd1c74ae49c20a7cd451974e.gif)
![](https://i-blog.csdnimg.cn/blog_migrate/4f1150b881333f12a311ae9ef34da474.gif)
![](https://i-blog.csdnimg.cn/blog_migrate/4f1150b881333f12a311ae9ef34da474.gif)
![](https://i-blog.csdnimg.cn/blog_migrate/4f1150b881333f12a311ae9ef34da474.gif)
![](https://i-blog.csdnimg.cn/blog_migrate/4f1150b881333f12a311ae9ef34da474.gif)
![](https://i-blog.csdnimg.cn/blog_migrate/4f1150b881333f12a311ae9ef34da474.gif)
![](https://i-blog.csdnimg.cn/blog_migrate/4f1150b881333f12a311ae9ef34da474.gif)
![](https://i-blog.csdnimg.cn/blog_migrate/4f1150b881333f12a311ae9ef34da474.gif)
![](https://i-blog.csdnimg.cn/blog_migrate/4f1150b881333f12a311ae9ef34da474.gif)
![](https://i-blog.csdnimg.cn/blog_migrate/4f1150b881333f12a311ae9ef34da474.gif)