the Action has a ModelData:userList private List <User> userList; for(int i=0;i<3;i++){ user.setUserId(i+"i"); //userId user.setEmail(i+"@user.com"); //email userList.add(user); }
my tag in jsp is showed following: <s:select label="test" name="test"list="${userList}" listKey="email" listValue="userId" required="true" /> ------------------------------------------------------------------------------------------------------------------------------------ but some error caused below: tag 'select', field 'list', name 'assignEditor': The requested list key '$userList' could not be resolved as a collection/array/map/enumeration/iterator type. Example: people or people.{name} - [unknown location] javax.servlet.ServletException: tag 'select', field 'list', name 'assignEditor': The requested list key '$userList' could not be resolved as a collection/array/map/enumeration/iterator type. Example: people or people.{name} - [unknown location] at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:518) Thanks for U answer. -- BestRegards, Mead http://yayisoft.com