Annotation Type SlingServletPathsStrict


@Requirement(namespace="osgi.extender", name="org.apache.sling.servlets.resolver", version="1.1") @ComponentPropertyType public @interface SlingServletPathsStrict
Using this requires the SLING-8110 strict mode
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    The absolute paths under which the servlet is accessible as a resource.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    The request URL extensions supported by the servlet.
    The HTTP request methods supported by the servlet.
    boolean
    Activate the strict resolution mode.
    One or more request URL selectors supported by the servlet.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    Prefix for every property being generated from the annotations elements (as defined in OSGi 7 Compendium, 112.8.2.1)
  • Field Details

    • PREFIX_

      static final String PREFIX_
      Prefix for every property being generated from the annotations elements (as defined in OSGi 7 Compendium, 112.8.2.1)
      See Also:
  • Element Details

    • paths

      String[] paths
      The absolute paths under which the servlet is accessible as a resource. A relative path is made absolute by prefixing it with the value set through the SlingServletPrefix annotation.

      This annotation or SlingServletResourceTypes should be used to properly register the servlet in Sling. If both are set the servlet is registered using both ways.

      A servlet using this property might be ignored unless its path is included in the Execution Paths servletresolver.paths configuration setting of the org.apache.sling.servlets.resolver.internal.SlingServletResolver service.

      Returns:
      the absolute paths under which the servlet is accessible as a resource
      See Also:
    • paths_strict

      boolean paths_strict
      Activate the strict resolution mode. Must be set to true (which is the default) for the other options besides "paths" to be taken into account. This value should NOT BE CHANGED: this annotation makes no sense if this value is not "true". We don't have a way currently to define constant values here (SLING-9055)
      Returns:
      the "strict" option value
      Default:
      true
    • selectors

      String[] selectors
      One or more request URL selectors supported by the servlet. If specified, all selectors must match for the servlet to be selected.
      Returns:
      the selector(s)
      Default:
      {}
    • extensions

      String[] extensions
      The request URL extensions supported by the servlet. If specified, one of these must match the request for the servlet to be selected.
      Returns:
      the extension(s)
      See Also:
      Default:
      {}
    • methods

      String[] methods
      The HTTP request methods supported by the servlet. If specified, the request's method must match this value for the servlet to be selected.
      Returns:
      the methods(s)
      See Also:
      Default:
      {}