title: AEM: Convert/Adapt resource to page
body: <p>Resource object needs to be adapted to Page class or a way to extract/refer page related to resource. I have tried following way; however it does not seems to work</p>
  <pre><code>final Resource resource = resourceResolver.getResource(pagePath);
  final Page cPage = resource.adaptTo(Page.class);
  </code></pre>
  <p>It returns <code>null</code> o cPage</p>