This can be simplified using the `@SlingServlet` annotation.

```
@SlingServlet(
        label = "Samples - Sling Servlet",
        description = "...",
        paths = {"/services/all-sample"},
        methods = {"GET", "POST"}, 
        resourceTypes = {}, 
        selectors = {"print.a4"},
        extensions = {"html", "htm"}  
)
```