I would like to instantiate a Sling Model from a JSP using a path to a resource like
<sling:adaptTo adaptable="/path/to/my/resource" adaptTo="org.apache.sling.models.it.models.MyModel" var="model"/>
Within the the Sling Model, I would like to access properties of the specified resource via @ValueMapValue
annotations.
My question is, how can I adapt my Sling Model to a resource path String so that I can inject the properties of the specified resource?