Class TapestryHttpSymbolConstants

java.lang.Object
org.apache.tapestry5.http.TapestryHttpSymbolConstants

public final class TapestryHttpSymbolConstants extends Object
Class defining constants for Tapestry HTTP symbols.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    Version number of the application.
    static final String
    The charset used when rendering page markup; the charset is also used as the request encoding when handling incoming requests.
    static final String
    If "true" then at the end of each request the SessionPersistedObjectAnalyzer will be called on each session persisted object that was accessed during the request.
    static final String
    Identifies the context path of the application, as determined from ServletContext.getContextPath().
    static final String
    Boolean value defining whether the Access-Control-Allow-Credentials HTTP header should be set automatically in the response for CORS requests.
    static final String
    Value to be used in the Access-Control-Allow-Methods in CORS preflight request responses.
    static final String
    Value to be used in the Access-Control-Allow-Headers in CORS preflight request responses.
    static final String
    Comma-delimited of origins allowed for CORS.
    static final String
    Defines whether the CORS (Cross-Origing Resource Sharing) support should be enabled or not.
    static final String
    Value to be used in the Access-Control-Expose-Headers in CORS preflight request responses.
    static final String
    Value to be used in the Access-Control-Max-Age in responses to preflight CORS requests.
    static final String
    A comma separated list of execution modes used to control how the application is initialized.
    static final String
    If "true" (the default) then GZip compression is enabled for dynamic requests and for static assets.
    static final String
    The hostname that application should use when constructing an absolute URL.
    static final String
    The hostport that application should use when constructing an absolute URL.
    static final String
    The secure (https) hostport that application should use when constructing an absolute URL.
    static final String
    Minimum output stream size, in bytes, before output is compressed using GZIP.
    static final String
    Indicates whether Tapestry is running in production mode or developer mode.
    static final String
    If true (the default), then Tapestry will apply locking semantics around access to the HttpSession.
    static final String
    The version number of the core Tapestry framework, or UNKNOWN if the version number is not available (which should only occur when developing Tapestry).
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • HOSTNAME

      public static final String HOSTNAME
      The hostname that application should use when constructing an absolute URL. The default is "", i.e. an empty string, in which case system will use request.getServerName(). Not the same as environment variable HOSTNAME, but you can also contribute "$HOSTNAME" as the value to make it the same as the environment variable HOSTNAME.
      Since:
      5.3
      See Also:
    • HOSTPORT

      public static final String HOSTPORT
      The hostport that application should use when constructing an absolute URL. The default is "0", i.e. use the port value from the request.
      Since:
      5.3
      See Also:
    • HOSTPORT_SECURE

      public static final String HOSTPORT_SECURE
      The secure (https) hostport that application should use when constructing an absolute URL. The default is "0", i.e. use the value from the request. This is an alias to HOSTPORT_SECURE.
      Since:
      5.3
      See Also:
    • CLUSTERED_SESSIONS

      public static final String CLUSTERED_SESSIONS
      If "true" then at the end of each request the SessionPersistedObjectAnalyzer will be called on each session persisted object that was accessed during the request. This is provided as a performance enhancement for servers that do not use clustered sessions. The default is true, to preserve 5.2 behavior. For non-clustered applications (the majority), this value should be overridden to false. A future release of Tapestry may change the default.
      Since:
      5.3
      See Also:
    • SESSION_LOCKING_ENABLED

      public static final String SESSION_LOCKING_ENABLED
      If true (the default), then Tapestry will apply locking semantics around access to the HttpSession. Reading attribute names occurs with a shared read lock; getting or setting an attribute upgrades to an exclusive write lock. This can tend to serialize threads when a number of simultaneous (Ajax) requests from the client arrive ... however, many implementations of HttpSession are not thread safe, and often mutable objects are stored in the session and shared between threads. Leaving this on the default will yield a more robust application; setting it to false may speed up processing for more Ajax intensive applications (but care should then be given to ensuring that objects shared inside the session are themselves immutable or thread-safe).
      Since:
      5.4
      See Also:
    • APPLICATION_VERSION

      public static final String APPLICATION_VERSION
      Version number of the application. Prior to 5.4, this version number was integrated into asset URLs. Starting with 5.4, a checksum of the individual asset's content is used instead, and this version number is only used for documentation purposes; it appears in the default exception report page, for example. The default value is "0.0.1". In 5.3 and earlier, the default value was a random hexadecimal string.
      Since:
      5.1.0.0
      See Also:
    • PRODUCTION_MODE

      public static final String PRODUCTION_MODE
      Indicates whether Tapestry is running in production mode or developer mode. This affects a large number of Tapestry behaviors related to performance and security, including how exceptions are reported, whether far-future expire headers are emitted, whether JavaScript files may be combined, whether JSON is compressed, whether component field and parameter values are shadowed to instance variables (to assist with debugging), and more.
      See Also:
    • TAPESTRY_VERSION

      public static final String TAPESTRY_VERSION
      The version number of the core Tapestry framework, or UNKNOWN if the version number is not available (which should only occur when developing Tapestry).
      See Also:
    • CONTEXT_PATH

      public static final String CONTEXT_PATH
      Identifies the context path of the application, as determined from ServletContext.getContextPath(). This is either a blank string or a string that starts with a slash but does not end with one.
      Since:
      5.4
      See Also:
    • EXECUTION_MODE

      public static final String EXECUTION_MODE
      A comma separated list of execution modes used to control how the application is initialized. Each modes can contribute a list (comma separated) of Module classes to be loaded during startup, the order in which they appear is preserved. The default value is: production.
      See Also:
    • CHARSET

      public static final String CHARSET
      The charset used when rendering page markup; the charset is also used as the request encoding when handling incoming requests. The default is "UTF-8".
      See Also:
    • MIN_GZIP_SIZE

      public static final String MIN_GZIP_SIZE
      Minimum output stream size, in bytes, before output is compressed using GZIP. Shorter streams are not compressed. Tapestry buffers this amount and switches to a GZIP output stream as needed. The default is "100".
      Since:
      5.1.0.0
      See Also:
    • GZIP_COMPRESSION_ENABLED

      public static final String GZIP_COMPRESSION_ENABLED
      If "true" (the default) then GZip compression is enabled for dynamic requests and for static assets. If you are using a server that handles GZip compression for you, or you don't want to use the extra processing power necessary to GZIP requests, then override this to "false".
      Since:
      5.1.0.0
      See Also:
    • CORS_ENABLED

      public static final String CORS_ENABLED
      Defines whether the CORS (Cross-Origing Resource Sharing) support should be enabled or not. Default value is "false". If you set this to "true", you should also set CORS_ALLOWED_ORIGINS.
      Since:
      5.8.2
      See Also:
    • CORS_ALLOWED_ORIGINS

      public static final String CORS_ALLOWED_ORIGINS
      Comma-delimited of origins allowed for CORS. The special value "*" means allowing all origins. This is used by the default implementation of CorsHandlerHelper.getAllowedOrigin(javax.servlet.http.HttpServletRequest). Default value is the empty string (i.e. no origins allowed and CORS actually disabled).
      Since:
      5.8.2
      See Also:
    • CORS_ALLOW_CREDENTIALS

      public static final String CORS_ALLOW_CREDENTIALS
      Boolean value defining whether the Access-Control-Allow-Credentials HTTP header should be set automatically in the response for CORS requests. Default value is false. This is used by the default implementation of CorsHandlerHelper.configureCredentials(javax.servlet.http.HttpServletResponse).
      Since:
      5.8.2
      See Also:
    • CORS_ALLOW_METHODS

      public static final String CORS_ALLOW_METHODS
      Value to be used in the Access-Control-Allow-Methods in CORS preflight request responses. This is used by CorsHandlerHelper.configureMethods(javax.servlet.http.HttpServletResponse). Default value is GET,HEAD,PUT,PATCH,POST,DELETE.
      Since:
      5.8.2
      See Also:
    • CORS_ALLOWED_HEADERS

      public static final String CORS_ALLOWED_HEADERS
      Value to be used in the Access-Control-Allow-Headers in CORS preflight request responses. This is used by CorsHandlerHelper.configureAllowedHeaders(javax.servlet.http.HttpServletResponse, javax.servlet.http.HttpServletRequest), which only sets the header if the value isn't empty. Default value is the empty string.
      Since:
      5.8.2
      See Also:
    • CORS_EXPOSE_HEADERS

      public static final String CORS_EXPOSE_HEADERS
      Value to be used in the Access-Control-Expose-Headers in CORS preflight request responses. This is used by the default implementation of CorsHandlerHelper.configureExposeHeaders(javax.servlet.http.HttpServletResponse), which only sets the header if the value isn't empty. Default value is the empty string.
      Since:
      5.8.2
      See Also:
    • CORS_MAX_AGE

      public static final String CORS_MAX_AGE
      Value to be used in the Access-Control-Max-Age in responses to preflight CORS requests. This is used by CorsHandlerHelper.configureMaxAge(javax.servlet.http.HttpServletResponse), which only sets the header if the value isn't empty. Default value is the empty string. This is an alias for CORS_MAX_AGE.
      Since:
      5.8.2
      See Also:
  • Constructor Details