0

I made an AJAX call to a servlet printing just simple plain text and browser shows 'XML PARSING ERROR' and I've already used dataType as 'text'

var portNumber = $("#portNumber").val();
$.ajax({
            type: "GET",
            url: "serverServlet",
            data: {port : portNumber},
            dataType: 'json'
       });
3
  • I've tried changing dataType to 'text' once and then to 'json' but same problem. Jan 3, 2019 at 3:57
  • whats the response mime type? Jan 3, 2019 at 4:07
  • response mime type is just text/plain Jan 3, 2019 at 4:10

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.