which you want to use:
alert(JSON.stringify(data));
so you will look like this:
function ajaxsubmit(){
$.ajax({
url: "/update",
type: "POST",
}).complete(function(data) {
alert(JSON.stringify(data));
});
}
Your Java code looks like this: it wraps your string in an object before it sends it to the client, JSON.stringify () will show you the structure of the returned object and from there you can determine that the property of the returned object contains the returned variable (maybe something like data.data or data.return)