title: getJSON callback function not getting called in a js file
body: <p>In portlets, I have a JSP page where I have declared a resourceURL and mapped it to a Java class which has an overriden serveResource method. </p>
  
  <pre><code>   &lt;portlet:resourceURL var="myURL" &gt;
      &lt;portlet:param name="dataType" value="VOICE" /&gt;
  &lt;/portlet:resourceURL&gt;
  </code></pre>
  
  <p>I have a javascript in a js file whicn in turn fires an ajax call like this</p>
  
  <pre><code>$.getJSON(URL,{operator : 'XYZ'},function(b) {
  
          //mycode
  
  
          })
  </code></pre>
  
  <p>This js is imported into the jsp . Now when I click on the link, it triggers the javascript, the ajax call also goes through fine and request is passed to the java class. But the response is not coming back to the callback function. What I suspect is since this is in a seperate js file, the response is going to the jsp page and not to the callback function inside the js file. This exact same code works if I put it as inline script in the jsp.But I need to place the javascript code in a seperate js file and make it work.  Is there a way to pass some context information when I fire getJSON ?.. is there a way to accomplish this ?</p>