Solved
Page object not available
Hi All,
I am invoking a tag lib with slingRequest object in which i have the following code
import com.day.cq.wcm.api.Page; public class Temp extends SimpleTagSupport{ public static String getValue(SlingHttpServletRequest request){ LOG.info("Resource Path is {}",request.getResource()); Page page = request.getResource().adaptTo(Page.class); LOG.info("Page is {}",page); } }The resource path from the log is /content/my-cq-page/jcr:content and the page object that i got is null. I am not sure why it is null. Is there a better way to extract a page object from a sling request?
Can someone help me on this?
Thanks,
Jai.