Basically I will not do this if I have control in the front end, but when I am using DataTable ajax feature, they post the data like this:
columns[0][data]:0
columns[0][name]:
columns[0][searchable]:true
columns[0][orderable]:true
columns[0][search][value]:
columns[0][search][regex]:false
columns[1][data]:1
columns[1][name]:
columns[1][searchable]:true
columns[1][orderable]:true
columns[1][search][value]:
columns[1][search][regex]:false
columns[2][data]:2
columns[2][name]:
columns[2][searchable]:true
columns[2][orderable]:true
columns[2][search][value]:
columns[2][search][regex]:false
columns[3][data]:3
columns[3][name]:
columns[3][searchable]:true
columns[3][orderable]:true
columns[3][search][value]:
columns[3][search][regex]:false
columns[4][data]:4
columns[4][name]:
I have 2 questions:
1) how can I retrieve the value accordingly in servlet? getParameterValues can only get 1 dimensional array, I not sure how to retrieve the example above.
2) how can I retrieve the value if I am using Spring MVC?
getParameterNames()orgetParameterMap()and iterate over all of the parameters above. You seerequest.getParameterValues()will give you multiple values if exactly the same parameter is specified more than once: givenhttp://x.com/aaa?p=1&p=2&p=3,request.getParameterValues("p")returns["1","2","3"](always a string array).