Yes, you just put the url you want to call using AJAX in that method I presume.

xhr.open("GET","http://my.url.domain/path/to/my/servlet/or/jsp/here", true);


// Json