I am doing a project using Struts2 and I have a problem with assigning a set.
Here is my action (I ruled out the non-essential part)
public class TeamAction extends BaseAction implements ModelDriven<Team>
{
Team team=new Team();
}
Here is my model Team(I excluded the non-essential part)
private TeamId id;
private Set students = new HashSet(0);
Here is my part of the jsp
<input type="text" name=team.student[0].id />
Now the problem is that I cannot insert the correct value into this collection Setin ModelDriven, this will throw an exception. Could you tell me what to write in the JSP file, so I can insert the value into the collection Setin my model?
source
share