title: CQ5 Invalid recursion selector value 'data' (data.json.jsp)
body: <p>Let's say I have a page in CQ5. I created this page using a template with a single component, call it tableComp, and I hit at url <em>Test.html</em>. The component contains its standard JSP file but the page template being used also contains a specific JSP for JSON or XML rendering of custom data, not page data.</p>
  
  <p>This JSP file for rendering would be named something like <em>data.xml.jsp</em> or <em>data.json.jsp</em>. To hit this rendering JSP for the page <em>Test.html</em> you would call <em>/content/{org}/desktop/en_US/{name}/Test.data.json</em> or <em>/content/{org}/desktop/en_US/{name}/Test.data.xml</em>.</p>
  
  <p>The XML/JSON JSP would be called which contains code to just get values and print to the screen XML or JSON. Ex: Blah</p>
  
  <p>Now I want to display information to the screen as a JSON output when I hit a new file named <em>data.json.jsp</em>. When hitting <em>data.xml.jsp</em> it works correctly and hits the JSP. When I do the exact same process for the <em>data.json.jsp</em> I then get the following.</p>
  
  <pre><code>Invalid recursion selector value 'data' 
  Cannot serve request to /content/{org}/desktop/en_US/{name}/Test.data.json in org.apache.sling.servlets.get.DefaultGetServlet
  
  Request Progress:
  
        0 (2015-07-22 18:10:06) TIMER_START{Request Processing}
        0 (2015-07-22 18:10:06) COMMENT timer_end format is {&lt;elapsed msec&gt;,&lt;timer name&gt;} &lt;optional message&gt;
        0 (2015-07-22 18:10:06) LOG Method=GET, PathInfo=/content/{org}/desktop/en_US/{name}/Test.data.json
  </code></pre>
  
  <p>I have tried adding a Pages.json.jsp file to the /libs/foundation/components/primary/cq/Page section as suggested in another forum but this did not help. The content of this Pages.json.jsp file was &lt;%@include file="proxy.jsp"%>.</p>
  
  <p>How can I get JSON to work for this type of request?</p>
  
  <p>EDIT:</p>
  
  <p>I have changed my original explanation to clarify my problem.</p>