Ajax passes {"items":arr}, where arr=[];
In the background String[] items=req.getParameterValues("items"); find that it cannot be received, print the parameter name
Enumeration<String> names = req.getParameterNames();
while (names.hasMoreElements()) {
String string = (String) names.nextElement();
System.out.println(string);
}
The print is "items[]", so it is changed to String[] items=req.getParameterValues("items[]"); for correct reception