Class StaticFilesResource

java.lang.Object
org.apache.juneau.rest.server.servlet.RestResource
org.apache.juneau.rest.server.staticfile.StaticFilesResource

public class StaticFilesResource extends RestResource
Child-resource flavor of the static-files capability.

Mounts as a routed child via @Rest(children=StaticFilesResource.class) under a parent at the subtree /static and serves static files by delegating to the flavor-neutral StaticFiles worker bean resolved from the request context (RestContext.getStaticFiles()) — the same worker the mixin and servlet flavors use, so the three forms cannot drift.

Whereas the StaticFilesMixin mixin pins its op at /static/* to merge into a host's namespace, this child declares the subtree at the class level (@Rest(path="/static")) and pins the ops at /* — the op must not re-pin /static/* or it would double-path to /static/static/* under the routed-subtree wiring.

See Also:
Since:
10.0.0