关于struts2的一个小问题
一个小问题 ,高手们请看下面代码问题出在哪里
public class PersonAction extends ActionSupport{
private StaticThing staticThing;
private Person person;
public PersonAction() {
super();
this.staticThing = new StaticThing();
}
public void setStaticThing(StaticThing staticThing) {
this.staticThing = staticThing;
}
public StaticThing getStaticThing() {
return staticThing;
}
public void setPerson(Person person){this.person = person;}
public Person getPerson(){return this.person;}
}
public class StaticThing {
private Nation nation;
public Nation getNation() {
return nation;
}
public void setNation(Nation nation) {
this.nation = nation;
}
}
public class Nation {
private Collection<String> list = new ArrayList<String>();
public Nation(){
list.add("汉族");
list.add("回族");
list.add("满族");
list.add("苗族");
}
public Collection<String> getList() {
return list;
}
public void setList(Collection<String> list) {
this.list = list;
}
}
jsp代码:
民族s:select name="person.nation" list="staticThing.nation.list"/>
===============分割线==========================================
提示说:
org.apache.jasper.JasperException: tag 'select', field 'list', name 'person.nation': The requested list key 'staticThing.nation.list' could not be resolved as a collection/array/map/enumeration/iterator type. Example: people or people.{name} - [unknown location]
-------------------------------------------------
请问哪里错了, staticThing.nation.list这种连着用好几个"."的写法可以吗?应该怎么写