Interface PaxWebConfig


  • public interface PaxWebConfig

    Dedicated interface with constants related to configuration. Other constants reside in PaxWebConstants.

    Constants names use the following prefixes:

    • PID_CFG_ - for property names found in org.ops4j.pax.web PID

    When adding new properties, remember to add them in more places:

    • Constant name in this interface
    • Relevant method (if needed) in org.ops4j.pax.web.service.spi.config.Configuration
    • Metatype information for default values (if needed) in pax-web-runtime/src/main/resources/OSGI-INF/metatype/metatype.xml

    • Field Detail

      • PID_CFG_TEMP_DIR

        static final String PID_CFG_TEMP_DIR
        Servlet API 4, 4.8.1 "Temporary Working Directories". According to specification, it should be different for each ServletContext, but we also need single global temporary directory.
        See Also:
        Constant Field Values
      • PID_CFG_SERVER_CONFIGURATION_FILE

        static final String PID_CFG_SERVER_CONFIGURATION_FILE
        Option to specify single external configuration file.
        See Also:
        Constant Field Values
      • PID_CFG_SERVER_CONFIGURATION_FILES

        static final String PID_CFG_SERVER_CONFIGURATION_FILES
        Specify comma-separated list of external, server-specific config locations.
        Since:
        Pax Web 8
        See Also:
        Constant Field Values
      • PID_CFG_CONTEXT_CONFIGURATION_FILE

        static final String PID_CFG_CONTEXT_CONFIGURATION_FILE
        Option to specify single global context configuration file (only Jetty and Tomcat).
        See Also:
        Constant Field Values
      • PID_CFG_HTTP_PORT

        static final String PID_CFG_HTTP_PORT
        This property specifies the port used for servlets and resources accessible via HTTP. The default value for this property is 80 according to specification, but we'll use 8080.
        See Also:
        Constant Field Values
      • PID_CFG_HTTP_PORT_SECURE

        static final String PID_CFG_HTTP_PORT_SECURE
        This property specifies the port used for servlets and resources accessible via HTTPS. The default value for this property is 443 according to specificaton, but we'll use 8443.
        See Also:
        Constant Field Values
      • PID_CFG_HTTP_ENABLED

        static final String PID_CFG_HTTP_ENABLED
        Should the default non-secure port be enabled?
        See Also:
        Constant Field Values
      • PID_CFG_HTTP_SECURE_ENABLED

        static final String PID_CFG_HTTP_SECURE_ENABLED
        Should the default secure port be enabled?
        See Also:
        Constant Field Values
      • PID_CFG_LISTENING_ADDRESSES

        static final String PID_CFG_LISTENING_ADDRESSES
        Comma-separated list of addresses to bind listeners/connectors to. Defaults to 0.0.0.0
        See Also:
        Constant Field Values
      • PID_CFG_HTTP_CONNECTOR_NAME

        static final String PID_CFG_HTTP_CONNECTOR_NAME
        Name to use as default (non-secure) connector, defaults to default.
        See Also:
        Constant Field Values
      • PID_CFG_HTTP_SECURE_CONNECTOR_NAME

        static final String PID_CFG_HTTP_SECURE_CONNECTOR_NAME
        Name to use as secure connector, defaults to secureDefault.
        See Also:
        Constant Field Values
      • PID_CFG_CONNECTOR_IDLE_TIMEOUT

        static final String PID_CFG_CONNECTOR_IDLE_TIMEOUT
        Jetty: org.eclipse.jetty.server.AbstractConnector#setIdleTimeout(long)
        See Also:
        Constant Field Values
      • PID_CFG_SERVER_IDLE_TIMEOUT

        static final String PID_CFG_SERVER_IDLE_TIMEOUT
        Jetty: org.eclipse.jetty.util.thread.QueuedThreadPool#setIdleTimeout(int)
        See Also:
        Constant Field Values
      • PID_CFG_SERVER_MAX_THREADS

        static final String PID_CFG_SERVER_MAX_THREADS
        Gets maximum number of threads to use in server runtime. Jetty: org.eclipse.jetty.util.thread.QueuedThreadPool#setMaxThreads(int)
        See Also:
        Constant Field Values
      • PID_CFG_SERVER_MIN_THREADS

        static final String PID_CFG_SERVER_MIN_THREADS
        Gets minimum number of threads to use in server runtime. Jetty: org.eclipse.jetty.util.thread.QueuedThreadPool#setMinThreads(int)
        See Also:
        Constant Field Values
      • PID_CFG_SERVER_THREAD_NAME_PREFIX

        static final String PID_CFG_SERVER_THREAD_NAME_PREFIX
        Prefix to use for server thread names. Jetty: org.eclipse.jetty.util.thread.QueuedThreadPool#setName(java.lang.String)
        See Also:
        Constant Field Values
      • PID_CFG_HTTP_CHECK_FORWARDED_HEADERS

        static final String PID_CFG_HTTP_CHECK_FORWARDED_HEADERS
        Jetty: adds org.eclipse.jetty.server.ForwardedRequestCustomizer to HttpConfiguration
        See Also:
        Constant Field Values
      • PID_CFG_VIRTUAL_HOST_LIST

        static final String PID_CFG_VIRTUAL_HOST_LIST
        Comma-separated list of virtual hosts to set on every deployed context if the context itself doesn't specify such configuration. Defaults to empty list.
        See Also:
        Constant Field Values
      • PID_CFG_CONNECTOR_LIST

        static final String PID_CFG_CONNECTOR_LIST
        Comma-separated list of connector names to set on every deployed context if the context itself doesn't specify such configuration. Defaults to empty list.
        See Also:
        Constant Field Values
      • PID_CFG_EVENT_DISPATCHER_THREAD_COUNT

        static final String PID_CFG_EVENT_DISPATCHER_THREAD_COUNT
        Option to specify number of threads for internal web element/context (un)registration event dispatching. Defaults to 1 ("3" was hardcoded before Pax Web 8).
        See Also:
        Constant Field Values
      • BUNDLE_CONTEXT_PROPERTY_WAR_EXTENDER_THREADS

        static final String BUNDLE_CONTEXT_PROPERTY_WAR_EXTENDER_THREADS
        BundleContext property to configure thread count for WAR extender. Before Pax Web 8 it was hardcoded to 3 (which is still the default value).
        See Also:
        Constant Field Values
      • BUNDLE_CONTEXT_PROPERTY_WAR_EXTENDER_JARS_TO_SKIP

        static final String BUNDLE_CONTEXT_PROPERTY_WAR_EXTENDER_JARS_TO_SKIP
        Context property listing symbolic names of the bundles or jar names (in /WEB-INF/lib) patterns to skip when searching for TLDs, web fragments and annotated classes. This property can have special value of "default" (no quotes) which roughly matches Tomcat's tomcat.util.scan.StandardJarScanFilter.jarsToSkip property
        See Also:
        Constant Field Values
      • BUNDLE_CONTEXT_PROPERTY_WAR_EXTENDER_JARS_TO_SCAN

        static final String BUNDLE_CONTEXT_PROPERTY_WAR_EXTENDER_JARS_TO_SCAN
        Context property listing symbolic names of the bundles or jar names (in /WEB-INF/lib) patterns to skan when searching for TLDs, web fragments and annotated classes. Normally all the reachable jars are scanned, but if something is matched by BUNDLE_CONTEXT_PROPERTY_WAR_EXTENDER_JARS_TO_SKIP, we can skan it by adding the pattern to this property (by default this property has empty value, which means that all non-skipped libraries are scanned).
        See Also:
        Constant Field Values
      • PID_CFG_SSL_KEYSTORE

        static final String PID_CFG_SSL_KEYSTORE
        File or URL to location of Keystore with server certificate and private key.
        See Also:
        Constant Field Values
      • PID_CFG_SSL_KEYSTORE_PASSWORD

        static final String PID_CFG_SSL_KEYSTORE_PASSWORD
        Password for entire server keystore
        See Also:
        Constant Field Values
      • PID_CFG_SSL_KEY_PASSWORD

        static final String PID_CFG_SSL_KEY_PASSWORD
        Password for private key entry inside server keystore
        See Also:
        Constant Field Values
      • PID_CFG_SSL_KEY_ALIAS

        static final String PID_CFG_SSL_KEY_ALIAS
        Alias of private key entry in server keystore to use of no SNI is enabled
        See Also:
        Constant Field Values
      • PID_CFG_SSL_TRUSTSTORE

        static final String PID_CFG_SSL_TRUSTSTORE
        File or URL to location of server truststore.
        See Also:
        Constant Field Values
      • PID_CFG_SSL_TRUSTSTORE_PASSWORD

        static final String PID_CFG_SSL_TRUSTSTORE_PASSWORD
        Password for entire server truststore
        See Also:
        Constant Field Values
      • PID_CFG_SSL_RENEGOTIATION_ALLOWED

        static final String PID_CFG_SSL_RENEGOTIATION_ALLOWED
        Allow SSL renegotiation
        See Also:
        Constant Field Values
      • PID_CFG_SSL_RENEGOTIATION_LIMIT

        static final String PID_CFG_SSL_RENEGOTIATION_LIMIT
        SSL renegotiation limit
        See Also:
        Constant Field Values
      • PID_CFG_SSL_SESSION_CACHE_SIZE

        static final String PID_CFG_SSL_SESSION_CACHE_SIZE
        SSL Session cache size. Defaults to -1
        See Also:
        Constant Field Values
      • PID_CFG_SSL_SESSION_TIMEOUT

        static final String PID_CFG_SSL_SESSION_TIMEOUT
        SSL Session timeout. Defaults to -1
        See Also:
        Constant Field Values
      • PID_CFG_VALIDATE_CERTS

        static final String PID_CFG_VALIDATE_CERTS
        Whether certificates in server keystore should be validated on load
        See Also:
        Constant Field Values
      • PID_CFG_VALIDATE_PEER_CERTS

        static final String PID_CFG_VALIDATE_PEER_CERTS
        Whether certificates in server truststore should be validated on load
        See Also:
        Constant Field Values
      • PID_CFG_ENABLE_OCSP

        static final String PID_CFG_ENABLE_OCSP
        Should On-Line Certificate Status Protocol (OCSP) be enabled?
        See Also:
        Constant Field Values
      • PID_CFG_ENABLE_CRLDP

        static final String PID_CFG_ENABLE_CRLDP
        Should Certificate Revocation List Distribution Points support (CRLDP) be enabled?
        See Also:
        Constant Field Values
      • PID_CFG_OCSP_RESPONDER_URL

        static final String PID_CFG_OCSP_RESPONDER_URL
        OCSP responder URL, though it doesn't seem to be used by Jetty.
        See Also:
        Constant Field Values
      • PID_CFG_MAX_CERT_PATH_LENGTH

        static final String PID_CFG_MAX_CERT_PATH_LENGTH
        Return max length of cert path to use during certificate validation
        See Also:
        Constant Field Values
      • PID_CFG_DIGESTAUTH_MAX_NONCE_AGE

        static final String PID_CFG_DIGESTAUTH_MAX_NONCE_AGE
        Return max nonce age for DIGEST authentication (in ms), defaults to 60s (60000ms)
        See Also:
        Constant Field Values
      • PID_CFG_DIGESTAUTH_MAX_NONCE_COUNT

        static final String PID_CFG_DIGESTAUTH_MAX_NONCE_COUNT
        Return max nonce count for DIGEST authentication, defaults to 1024
        See Also:
        Constant Field Values
      • PID_CFG_FORMAUTH_REDIRECT

        static final String PID_CFG_FORMAUTH_REDIRECT
        Returns whether to forward (false, default) to form-login error page or use redirect (true)
        See Also:
        Constant Field Values
      • PID_CFG_LOG_NCSA_ENABLED

        static final String PID_CFG_LOG_NCSA_ENABLED
        Should we enable "NCSA Logger"?
        See Also:
        Constant Field Values
      • PID_CFG_LOG_NCSA_LOGDIR

        static final String PID_CFG_LOG_NCSA_LOGDIR
        Directory to store request log files
        See Also:
        Constant Field Values
      • PID_CFG_LOG_NCSA_LOGFILE

        static final String PID_CFG_LOG_NCSA_LOGFILE
        Jetty: defaults to "yyyy_mm_dd.request.log", should contain yyyy_mm_dd. Tomcat: it should NOT contain yyyy_mm_dd, so please specify your own name. Undertow: will be appended with "log" or "yyyy-MM-dd.log"
        See Also:
        Constant Field Values
      • PID_CFG_LOG_NCSA_LOGFILE_DATE_FORMAT

        static final String PID_CFG_LOG_NCSA_LOGFILE_DATE_FORMAT
        Date format to use when current file is renamed during rollover Jetty: org.eclipse.jetty.util.RolloverFileOutputStream._fileDateFormat = ROLLOVER_FILE_DATE_FORMAT
        See Also:
        Constant Field Values
      • PID_CFG_LOG_NCSA_RETAINDAYS

        static final String PID_CFG_LOG_NCSA_RETAINDAYS
        Number of days to retain request files Jetty: org.eclipse.jetty.server.RequestLogWriter._retainDays
        See Also:
        Constant Field Values
      • PID_CFG_LOG_NCSA_EXTENDED

        static final String PID_CFG_LOG_NCSA_EXTENDED
        Jetty whether to use CustomRequestLog#EXTENDED_NCSA_FORMAT or CustomRequestLog#NCSA_FORMAT
        See Also:
        Constant Field Values
      • PID_CFG_LOG_NCSA_LOGTIMEZONE

        static final String PID_CFG_LOG_NCSA_LOGTIMEZONE
        Timezone to use in logs Jetty: org.eclipse.jetty.server.RequestLogWriter#_timeZone
        See Also:
        Constant Field Values
      • PID_CFG_LOG_NCSA_BUFFERED

        static final String PID_CFG_LOG_NCSA_BUFFERED
        Whether NCSA log file access should be buffered. Defaults to true.
        See Also:
        Constant Field Values
      • PID_CFG_DEFAULT_SERVLET_ACCEPT_RANGES

        static final String PID_CFG_DEFAULT_SERVLET_ACCEPT_RANGES

        Boolean property to specify whether default servlet should reply with Accept-Ranges: bytes header.

        • Jetty: acceptRanges boolean init parameter
        • Tomcat: useAcceptRanges boolean init parameter

        See Also:
        Constant Field Values
      • PID_CFG_DEFAULT_SERVLET_REDIRECT_WELCOME

        static final String PID_CFG_DEFAULT_SERVLET_REDIRECT_WELCOME

        Boolean property to specify whether welcome file should be served immediately, or by redirect.

        • Jetty: redirectWelcome boolean init parameter

        See Also:
        Constant Field Values
      • PID_CFG_DEFAULT_SERVLET_DIR_LISTING

        static final String PID_CFG_DEFAULT_SERVLET_DIR_LISTING

        Boolean property to specify whether dir index should be present when accessing dir resource.

        • Jetty: dirAllowed boolean init parameter
        • Tomcat: listings boolean init parameter
        • Undertow: directory-listing boolean init parameter

        See Also:
        Constant Field Values
      • PID_CFG_DEFAULT_SERVLET_CACHE_MAX_ENTRIES

        static final String PID_CFG_DEFAULT_SERVLET_CACHE_MAX_ENTRIES

        Integer property to specify maximum number of cache entries (per single resource manager).

        • Jetty: maxCachedFiles integer init parameter
        • Tomcat: no such option (but there's default 5s TTL)
        • Undertow: separate io.undertow.server.handlers.cache.LRUCache#maxEntries for metadata and "regions" + "slices" parameters in LimitedBufferSlicePool

        See Also:
        Constant Field Values
      • PID_CFG_DEFAULT_SERVLET_CACHE_MAX_ENTRY_SIZE

        static final String PID_CFG_DEFAULT_SERVLET_CACHE_MAX_ENTRY_SIZE

        Integer property to specify maximum size (kB) of single cache entry (file) (per single resource manager).

        • Jetty: maxCachedFileSize integer init parameter
        • Tomcat: org.apache.catalina.webresources.StandardRoot#setCacheObjectMaxSize() (kB)
        • Undertow: io.undertow.server.handlers.resource.CachingResourceManager#maxFileSize() (B)

        See Also:
        Constant Field Values
      • PID_CFG_DEFAULT_SERVLET_CACHE_MAX_TOTAL_SIZE

        static final String PID_CFG_DEFAULT_SERVLET_CACHE_MAX_TOTAL_SIZE

        Integer property to specify maximum total size (kB) of the cache (per single resource manager).

        • Jetty: maxCacheSize boolean init parameter
        • Tomcat: org.apache.catalina.webresources.StandardRoot#setCacheMaxSize() (kB)
        • Undertow: new LimitedBufferSlicePool(bufferAllocator, sliceSize, sliceSize * slicesPerPage, maxMemory / (sliceSize * slicesPerPage))

        See Also:
        Constant Field Values
      • PID_CFG_DEFAULT_SERVLET_CACHE_TTL

        static final String PID_CFG_DEFAULT_SERVLET_CACHE_TTL

        Integer property to specify TTL for cache entries (ms)

        • Jetty: no such option, entries are evicted by last access time
        • Tomcat: org.apache.catalina.webresources.StandardRoot#setCacheTtl(long) (ms)
        • Undertow: io.undertow.server.handlers.resource.CachingResourceManager#maxAge and io.undertow.server.handlers.cache.LRUCache#maxAge

        See Also:
        Constant Field Values
      • PID_CFG_SHOW_STACKS

        static final String PID_CFG_SHOW_STACKS
        Boolean property to configure the container to show or hide stack traces in error handler.
        See Also:
        Constant Field Values
      • PID_CFG_SESSION_TIMEOUT

        static final String PID_CFG_SESSION_TIMEOUT
        Integer property that specifies timeout of sessions in minutes (defaults to 30)
        See Also:
        Constant Field Values
      • PID_CFG_SESSION_COOKIE_NAME

        static final String PID_CFG_SESSION_COOKIE_NAME
        String property that specifies session cookie name (defaults to JSESSIONID)
        See Also:
        Constant Field Values
      • PID_CFG_SESSION_COOKIE_DOMAIN

        static final String PID_CFG_SESSION_COOKIE_DOMAIN
        String property that specifies session cookie domain
        See Also:
        Constant Field Values
      • PID_CFG_SESSION_COOKIE_PATH

        static final String PID_CFG_SESSION_COOKIE_PATH
        String property that specifies session cookie path (defaults to context path)
        See Also:
        Constant Field Values
      • PID_CFG_SESSION_COOKIE_COMMENT

        static final String PID_CFG_SESSION_COOKIE_COMMENT
        String property that specifies session cookie comment
        See Also:
        Constant Field Values
      • PID_CFG_SESSION_COOKIE_HTTP_ONLY

        static final String PID_CFG_SESSION_COOKIE_HTTP_ONLY
        Boolean property that specifies http only flag for session cookie. Defaults to true
        See Also:
        Constant Field Values
      • PID_CFG_SESSION_COOKIE_SECURE

        static final String PID_CFG_SESSION_COOKIE_SECURE
        Boolean property that specifies secure flag for session cookie. Defaults to false
        See Also:
        Constant Field Values
      • PID_CFG_SESSION_COOKIE_MAX_AGE

        static final String PID_CFG_SESSION_COOKIE_MAX_AGE
        Integer property that specifies max age of session cookie
        See Also:
        Constant Field Values
      • PID_CFG_SESSION_COOKIE_SAME_SITE

        static final String PID_CFG_SESSION_COOKIE_SAME_SITE
        String property that specifies SameSite attribute of session cookie
        See Also:
        Constant Field Values
      • PID_CFG_SESSION_URL

        static final String PID_CFG_SESSION_URL
        For Jetty, we can specify the URL path parameter for session URL rewriting. Defauts to jsessionid.
        See Also:
        Constant Field Values
      • PID_CFG_SESSION_WORKER_NAME

        static final String PID_CFG_SESSION_WORKER_NAME
        Allows configuration of Jetty's SessionHandler.SessionIdManager.workerName
        See Also:
        Constant Field Values
      • PID_CFG_SESSION_STORE_DIRECTORY

        static final String PID_CFG_SESSION_STORE_DIRECTORY
        When specified and is a valid directory location, file session persistence will be enabled
        See Also:
        Constant Field Values
      • PID_CFG_JSP_SCRATCH_DIR

        static final String PID_CFG_JSP_SCRATCH_DIR
        Global Scratch directory for JSPs - by default it is relative to global tmp dir and depends on the context
        See Also:
        Constant Field Values
      • PID_CFG_ENC_ENABLED

        static final String PID_CFG_ENC_ENABLED
        Boolean property that tells pax-web-runtime that the configuration may contain encrypted values. Defaults to false.
        See Also:
        Constant Field Values
      • PID_CFG_ENC_PREFIX

        static final String PID_CFG_ENC_PREFIX
        String property for the prefix for encrypted values. Defaults to ENC(
        See Also:
        Constant Field Values
      • PID_CFG_ENC_SUFFIX

        static final String PID_CFG_ENC_SUFFIX
        String property for the suffix for encrypted values. Defaults to )
        See Also:
        Constant Field Values
      • PID_CFG_ENC_PROVIDER

        static final String PID_CFG_ENC_PROVIDER
        Provider name to use for PBE encryption - defaults to SunJCE on Oracle/OpenJDK
        See Also:
        Constant Field Values
      • PID_CFG_ENC_MASTERPASSWORD

        static final String PID_CFG_ENC_MASTERPASSWORD
        Plain text encryption password
        See Also:
        Constant Field Values
      • PID_CFG_ENC_MASTERPASSWORD_ENV

        static final String PID_CFG_ENC_MASTERPASSWORD_ENV
        Environment variable to use for encryption password
        See Also:
        Constant Field Values
      • PID_CFG_ENC_MASTERPASSWORD_SYS

        static final String PID_CFG_ENC_MASTERPASSWORD_SYS
        System property to use for encryption password
        See Also:
        Constant Field Values
      • PID_CFG_ENC_ITERATION_COUNT

        static final String PID_CFG_ENC_ITERATION_COUNT
        IC parameter for PBE encryption - defaults to 1000
        See Also:
        Constant Field Values
      • PID_CFG_ENC_OSGI_DECRYPTOR

        static final String PID_CFG_ENC_OSGI_DECRYPTOR
        Similarly to Pax JDBC/JMS, we can reference an OSGi service with objectClass=org.jasypt.encryption.StringEncryptor and decryptor properties. A filter is created to track the OSGi service used to decrypt configuration values.
        See Also:
        Constant Field Values