Class HtdocMixin
java.lang.Object
org.apache.juneau.rest.server.servlet.RestMixin
org.apache.juneau.rest.server.ops.HtdocMixin
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
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.juneau.rest.server.servlet.RestMixin
RestMixin.Builder<R extends RestMixin,SELF extends RestMixin.Builder<R, SELF>>, RestMixin.DefaultBuilder<R extends RestMixin> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetHtdoc(RestRequest req, String path, Locale locale) [GET /htdocs/*] - Retrieve static file.Methods inherited from class org.apache.juneau.rest.server.servlet.RestMixin
builder, getHostContext, getRestBuilder, setContext
-
Constructor Details
-
HtdocMixin
public HtdocMixin()
-
-
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.
-