Reputation: 660
I am trying to get the last modified time for a resource from the JCR based upon the sling address provided within the provided tag link.
For example, if we have a cq page, with a parsys containing an image tag, the src tag provides /content/mysite/subdir/page/_jcr_content/section/par/image.img.jpg/1377167279557.jpg
What I am trying to get, is the image resource at /content/dam/geometrixx-media/articles/mountain-bike.jpg so that I can examine the metadata for the last modified time.
I would also like to do the same for scripts etc, so I am looking for the way that CQ5 does this internally, as when you hit the link /content/mysite/subdir/page/_jcr_content/section/par/image.img.jpg/1377167279557.jpg you get the right asset rendering out.
I have tried Resource res = resResolver.resolve(httpServletRequest, originalValue); however, I get sling:nonexisting as a result, although if I enter localhost:4502/content/mysite/subdir/page/_jcr_content/section/par/image.img.jpg/1377167279557.jpg the resource still shows up.
Any help would be greatly appreciated.
Upvotes: 0
Views: 569
Reputation: 6744
http://localhost:4502/system/console/requests
More info on the Sling site here.
Upvotes: 1