//jsp
$.ajax({
type: "GET",
url: "WebPage",
data: dataString,
dataType: "json",
//if received a response from the server
success: function( data, textStatus, jqXHR) {
//our country code was correct so we have some information to display
if(data.success){
$('#ddl').multiselect();
}
//display error message
else {
}
},
});
//servlet
Gson gs = new Gson();
String json = gs.toJson(names);
How do I bind my string json variable to my dropdownlist in the jsp?