jquery - Print JSON file from JSP -
i have jsp page should print json file. here directive
<%@ page contenttype="application/json;" pageencoding="utf-8"%>
and 1 line of code: out.println(result); //results json string db
but every time when call jsp page result jsp file instead of application/json
and try load json jsp:
.ajax({ url: url_res, datatype: 'json', contenttype: 'application/json', success: function(value, textstatus, jqxhr) { alert(textstatus+" "+value+" "+jqxhr);
and null in vale var.
pls help, need faculty project..
if directly put jsp page in browser , returned source code plain json, jsp page fine.
try testing data in json alert(textstatus+" "+value.something+" "+jqxhr);
Comments
Post a Comment