I am trying to extend ProfileImages servlet from /libs/foundation/src/impl/src/main/java/com/day/cq/wcm/foundation/pro file/impl/ProfileImages.java
and bundling as an OSGI service.
I have the following annotations
@Component(immediate=true)
@SlingServlet(
resourceTypes = {"nt:file"},
methods = {"GET"},
selectors = {"adjust","adjust.small"},
extensions = {"res", "jpg", "png", "gif"}
)
I see my service in bundles and Services in OSGI console. However it is not doing as ProfileImages servlet used to do
ProfileImages create the thumbnail if we invoke the following URL
If my servlet is invoke, I should get the same response
However I am getting is 404 which is from the DefaultGetServlet
It seems that Sling servet is not able to resolve my servlet
One thing I need to know is how to get my service updated in
Apache Sling Servlet Resolverorg.apache.sling.servlets.resolver
My servlet is doing the same thing as the following service in sling servlet resolver
Service ID 843 Types: org.apache.sling.api.resource.ResourceProvider
Description: ServletResourceProvider for Servlets at [/libs/foundation/components/primary/nt/file/prof/thumbnail.gif.servl et, /libs/foundation/components/primary/nt/file/prof.gif.servlet, /libs/foundation/components/primary/nt/file/prof/thumbnail.res.servle t, /libs/foundation/components/primary/nt/file/prof.jpg.servlet, /libs/foundation/components/primary/nt/file/prof.png.servlet, /libs/foundation/components/primary/nt/file/prof/thumbnail.png.servle t, /libs/foundation/components/primary/nt/file/prof/thumbnail.jpg.servle t, /libs/foundation/components/primary/nt/file/prof.res.servlet]
My service should be listed in sling resolver with id and something like
...../adjust.small.jpg.servlet, ..../adjust.res.servlet I am using CRXDE web version for development Is there any configurations I have to do to get my service in over resource resolver?