Sling Servlet annotations
Configurations methods, resourceTypes, selectors, extensions are IGNORED if paths is set.
Methods defaults to GET if not specified.
@SlingServlet(
label = "Samples - Sling Servlet",
description = "...",
paths = {"/services/all-sample"},
methods = {"GET", "POST"},
resourceTypes = {},
selectors = {"print.a4"},
extensions = {"html", "htm"}
)
Safe Methods Servlet (GET, HEAD)
public class SampleServlet extends SlingSafeMethodsServlet implements OptingServlet {
...
}
All Methods Servlet (GET, HEAD, POST, PUT, DELETE)
public class SampleServlet extends SlingAllMethodsServlet implements OptingServlet {
...
}
great
ReplyDelete