On 17.10.2014, at 00:04, Kumar <[email protected]> wrote:
> 
> I am versioning my content in Sling. A new version is created every time a
> resource is updated. I want to access the versioned content using url. How
> to access the versioned content through URL in sling?Please help.

OOTB Sling does not provide a servlet for that.

If you want to have all sling rendering work with the versioned content (e.g. 
nested includes in serlvets or JSPs) then you need to wrap the resource 
resolver, and use the JCR API to find the right version for each resource (the 
resource API does not support versioning), based on some timestamp (as the 
version name could be different for different nodes). Quite a bit of work, I 
did this in our product. I hooked in the custom resource resolver via a servlet 
filter so it works with all existing things. It will fail of course when a 
servlet uses the JCR API directly.

Cheers,
Alex

Reply via email to