Package org.apache.tapestry5.http

## 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 String` | `APPLICATION_VERSION` | Version number of the application.
    `static String` | `CHARSET` | The charset used when rendering page markup; the charset is also used as the request encoding when handling incoming requests.
    `static 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.
    `static String` | `CONTEXT_PATH` | Identifies the context path of the application, as determined from `ServletContext.getContextPath()`.
    `static String` | `EXECUTION_MODE` | A comma separated list of execution modes used to control how the application is initialized.
    `static String` | `GZIP_COMPRESSION_ENABLED` | If "true" (the default) then GZip compression is enabled for dynamic requests and for static assets.
    `static String` | `HOSTNAME` | The hostname that application should use when constructing an absolute URL.
    `static String` | `HOSTPORT` | The hostport that application should use when constructing an absolute URL.
    `static String` | `HOSTPORT_SECURE` | The secure (https) hostport that application should use when constructing an absolute URL.
    `static String` | `MIN_GZIP_SIZE` | Minimum output stream size, in bytes, before output is compressed using GZIP.
    `static String` | `PRODUCTION_MODE` | Indicates whether Tapestry is running in production mode or developer mode.
    `static String` | `SESSION_LOCKING_ENABLED` | If true (the default), then Tapestry will apply locking semantics around access to the `HttpSession`.
    `static 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).

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `TapestryHttpSymbolConstants()` |

  - ### Method Summary

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### 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:
        Constant Field Values

    - #### 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:
        Constant Field Values

    - #### 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:
        Constant Field Values

    - #### 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:
        Constant Field Values

    - #### 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:
        Constant Field Values

    - #### 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:
        Constant Field Values

    - #### 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:
        Constant Field Values

    - #### 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:
        Constant Field Values

    - #### 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:
        Constant Field Values

    - #### 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:
        Constant Field Values

    - #### 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:
        Constant Field Values

    - #### 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`, Constant Field Values

    - #### 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:
        `MIN_GZIP_SIZE`, `ResponseCompressionAnalyzer`, `CompressionAnalyzer`, Constant Field Values

  - ### Constructor Detail

    - #### TapestryHttpSymbolConstants

          public TapestryHttpSymbolConstants()