java - Passing javascript array tojava servlet -


I have received any other questions about this but I still have problems, when I getParamerterValues ​​< / Check the code>, it always comes back to null , and I think IM has trouble redirecting my controller. New with me, in the web app

  arr = []; $ (Document) .on ("click", "# idhere", function () {$ .post ("servlet.html", "id =" + arr + ", function (response) {});});  

Or is there something like changing the array of JavaScript into an array in the array, so can I pass it in my servlet?

  string AR [] = request.getParameterValues ​​("id"); if (arr! = Null) {// This line does not return true then my array also includes items}  

change

  string array [] = Request.getParameterValues ​​("arr");  

to

  string array [] = request.getParameterValues ​​("id");  

Comments

Popular posts from this blog

Member with no value in F# -

java - Joda Time Interval Not returning what I expect -

c# - Showing a SelectedItem's Property -