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

Popular posts from this blog

c# - How to set Z index when using WPF DrawingContext? -

razor - Is this a bug in WebMatrix PageData? -

visual c++ - Using relative values in array sorting ( asm ) -