Class HtdocMixin

java.lang.Object
org.apache.juneau.rest.server.servlet.RestMixin
org.apache.juneau.rest.server.ops.HtdocMixin

public class HtdocMixin extends RestMixin
Mixin providing the residual [GET /htdocs/*] static-file endpoint.

Single-responsibility op-mixin carved out of the former BasicRestOperations interface. Delegates the requested path to StaticFilesMixin.resolveStaticFile(RestRequest,String,Locale) — the same resolution chokepoint used by the newer StaticFilesMixin's configurable-mount handlers — so there is a single implementation of the static-file lookup logic even though this mixin keeps its own fixed, GET-only /htdocs/* mount for backward compatibility.

The greedy /htdocs/* blob handler is not API-meaningful and is excluded from the published Swagger/OpenAPI specification via @OpSwagger(ignore=true).

See Also:
Since:
10.0.0
  • Constructor Details

  • Method Details

    • getHtdoc

      public HttpResource getHtdoc(RestRequest req, @Path("/*") String path, Locale locale) throws NotFound
      [GET /htdocs/*] - Retrieve static file.
      Parameters:
      req - The HTTP request.
      path - The path to retrieve.
      locale - The locale of the HTTP request.
      Returns:
      An HTTP resource representing the static file.
      Throws:
      NotFound - If no resource matches the requested path.