i have to send form data which have multiselect boxes to a servlet using jquery ajax function for that i am using jquery serialize f开发者_开发百科unction
but i am getting this string mothertonguelist=English&mothertonguelist=French&mothertonguelist=Chinese
you can see that mothertonguelist is coming multiple times , how do i get these values inside servlet.
also what is the efficient way to save these multiple select box values in database so that it can be easy for me to populate these values back to the multiple select box .
also tell me some good way to populate the values inside the form from the servlet.
i don't want to use xml and and i have never used Json...
Thanks........
If anyone wants to get multiple box values in servlet then use this
String[] mothertonguelist = request .getParameterValues("mothertonguelist");
Can't you just parse each selected item out of the string that is returned, then store the items in a database? My assumption is that mothertonguelist comes through multiple times because it is selected multiple times.
精彩评论