the resource will be different for every instance so annotation is not a good candidate to pass this anyway. annotations would be used to wire up services when the services start on osgi bundle installation or update.
Sarwar On Mon, May 14, 2012 at 12:00 PM, Davide <[email protected]> wrote: > On 14/05/2012 11:55, Sarwar Bhuiyan wrote: > > it's just called resource, not currentResource in JSPs. In servlets, you > > get the resource from request.getResource or > > resourceResolver.getResource(path). Not sure what you're asking in terms > > of @Reference. Are you talking about when you are not in a servlet? If > > you're using some java service or helper class, why not pass the resource > > object in the parameter? > > Yes, I'm in a java class. Normally I pass in the SlingHttpServletRequest > and it works. I was just wondering about any annotation we could use. > > thanks > Davide > >
