io.helidon.webserver.staticcontent.ClasspathHandlerConfig

Description

Classpath based static content handler configuration

Configuration options

KeyTypeDefaultDescription
cached-filesList<String>A set of files that are cached in memory at startup
single-fileBooleanClasspath content usually starts from a ClasspathHandlerConfig#location() on classpath, and resolves all requested paths against this content root
temporary-storageTemporaryStorageCustomization of temporary storage configuration
memory-cacheMemoryCacheHandles will use memory cache configured on StaticContentConfig#memoryCache() by default
record-cache-capacityIntegerConfigures the capacity of the cache used for resource metadata
enabledBooleantrueWhether this handle is enabled, defaults to true
pre-compressed-enabledBooleanWhether pre-compressed sidecar resources should be selected for this handler; feature-registered handlers inherit the feature value when absent, directly created handlers default to disabled, and file system handlers configured with a single file always require handler-level opt-in
pre-compressed-cross-origin-sourcing-enabledBooleanWhether sidecar resources may be sourced from a different classpath origin than the logical resource; when not configured, feature-registered handlers inherit the feature-level value and direct services default to false
content-typesMap<String, BaseMethods>Maps a filename extension to the response content type
pre-compressed-encodingsMap<String, String>Pre-compressed content coding to file suffix mappings; handler mappings replace inherited feature-level mappings rather than merging with them, an explicit empty map disables sidecar lookups for this handler, codings must be unique concrete valid HTTP tokens other than identity and *, and suffixes have leading dots ignored and must not contain path separators
contextString/Context that will serve this handler's static resources, defaults to /
locationStringThe location on classpath that contains the root of the static content
socketsList<String>Sockets names (listeners) that will host this static content handler, defaults to all configured sockets
welcomeStringWelcome-file name

Usages


See the manifest for all available types.

Copyright © 2018, 2026 Oracle and/or its affiliates.