ajax - How to send a javascript array to Java servlet -


hello people i'm doing web application orthodox, method ajax using java , javascript.

and asking me if possible set array javascript servlet.

yes possible!

var test = []; $.ajax({     type: 'get',      url: 'someurl',     datatype: 'json',     data: {        test: json.stringify(test)      },     success: function(data) {      },     error: function(data) {         alert('fail');     } }); 

and in servlet:

string json = request.getparameter("test"); 

Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

javascript - Get parameter of GET request -

javascript - Twitter Bootstrap - how to add some more margin between tooltip popup and element -