创建一个空白的JSP(例如,
textBoxAjaxResp.jsp),然后从该JSP中放入您的JSON字符串:
<%String temp1;PopulateTextbox obj = new PopulateTextbox();temp1 = obj.method();%><%=temp1 %>
并使用jQuery AJAX调用命中该JSP。
$.get("mypath/textBoxAjaxResp.jsp", function (response) { //do operation using the response}, "json");


