Hello, AEM Community
I have the following issue:
I want to create a servlet which works with the following properties:
@Component(
immediate = true,
service = Servlet.class,
property = {
"sling.servlet.extensions=json",
"sling.servlet.extensions=js",
"sling.servlet.resourceTypes=sling/servlet/default",
"sling.servlet.methods=GET",
"sling.servlet.methods=HEAD",
"sling.servlet.paths=/content/unified"
}
)
public class UnifiedSettingsJSONServlet extends SlingSafeMethodsServlet {
...
}
But it activates on all paths, not only specified. If I delete "sling.servlet.resourceTypes=sling/servlet/default", it doesn't work at all. So, I think "sling.servlet.paths" is ignored and I don't know why. Do you have any ideas?
Use:
org.osgi.service.component.annotations.Component
AEM 6.3.
Thanks.