Reading File Names from JCR repository
I am trying to read file names from a path in JCR repository.
My component jsp is as follows:
<%@include file="/libs/foundation/global.jsp"%>
<%@ page import="java.util.ArrayList" %>
<h1><%= properties.get("title", currentPage.getTitle()) %></h1>
<%
com.cts.gto.dex.ListFragments FragmentsList = sling.getService(com.cts.gto.dex.ListFragments.class);
ArrayList<String> myList = FragmentsList.getList("//apps//DexScraper//fragments") ;
String fragname = myList.get(0);
System.out.println("Fragment Name is::"+fragname);
%>
But am getting error when trying to retrieve the list(highlighted in bold). I have attached the exception being generated.
I guess am not able to access this JCR path. Please suggest what changes are needed.
Many Thanks.