Sending an Ajax request to a Servlet. Question: How on a servlet to read data from this request and shove, say, the value of the Group variable in String (java)?
function () { var group = $("#group").val(); var request = {}; request.group = group; $.ajax({ /////////////////////// type: "POST", url: "/first", dataType: "json", data: request, success: function (response) { console.log(response.key); var url = "http://localhost:8080/first"; window.open(url); } }); //////////////// }