struts中如何让前台返回一个集合在后台能接收到这个集合

形如:
public class user{
private int id;
private String name;
private int age;
private List photoList;

//getter and setter

}

public class Photo{
private int id;
private int userId;
private String path;

//setter and getter

}

https://blog.csdn.net/cb2474600377/article/details/51162814

要看你的提交方式是什么样的
表单提交的话
属性名设置成photoList[index],应该就可以
ajax提交的话
使用json数组来封装就可以