title: Print JSON file from JSP
body: <p>I have JSP page that should print JSON file.
  Here is the directive </p>
  
  <pre><code>&lt;%@ page contentType="application/json;" pageEncoding="UTF-8"%&gt;
  </code></pre>
  
  <p>and one line of the code: out.println(result); //Results is JSON string from DB</p>
  
  <p>But every time when I call the jsp page the result is a JSP file instead of application/json</p>
  
  <p>And then I try to load JSON from the JSP:</p>
  
  <pre><code>.ajax({
     url: url_res,
     dataType: 'json',
     contentType: 'application/json',
    success: function(value, textStatus, jqXHR) {
                       alert(textStatus+" "+value+" "+jqXHR); 
  </code></pre>
  
  <p>And always I get NULL in the vale var.</p>
  
  <p>PLS help, i need this for my faculty project..</p>