Package org.apache.tapestry5.http
Class TapestryHttpSymbolConstants
- java.lang.Object
-
- org.apache.tapestry5.http.TapestryHttpSymbolConstants
-
public final class TapestryHttpSymbolConstants extends java.lang.Object
Class defining constants for Tapestry HTTP symbols.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
APPLICATION_VERSION
Version number of the application.static java.lang.String
CHARSET
The charset used when rendering page markup; the charset is also used as the request encoding when handling incoming requests.static java.lang.String
CLUSTERED_SESSIONS
If "true" then at the end of each request theSessionPersistedObjectAnalyzer
will be called on each session persisted object that was accessed during the request.static java.lang.String
CONTEXT_PATH
Identifies the context path of the application, as determined fromServletContext.getContextPath()
.static java.lang.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.static java.lang.String
CORS_ALLOW_METHODS
Value to be used in the Access-Control-Allow-Methods in CORS preflight request responses.static java.lang.String
CORS_ALLOWED_HEADERS
Value to be used in the Access-Control-Allow-Headers in CORS preflight request responses.static java.lang.String
CORS_ALLOWED_ORIGINS
Comma-delimited of origins allowed for CORS.static java.lang.String
CORS_ENABLED
Defines whether the CORS (Cross-Origing Resource Sharing) support should be enabled or not.static java.lang.String
CORS_EXPOSE_HEADERS
Value to be used in the Access-Control-Expose-Headers in CORS preflight request responses.static java.lang.String
CORS_MAX_AGE
Value to be used in the Access-Control-Max-Age in responses to preflight CORS requests.static java.lang.String
EXECUTION_MODE
A comma separated list of execution modes used to control how the application is initialized.static java.lang.String
GZIP_COMPRESSION_ENABLED
If "true" (the default) then GZip compression is enabled for dynamic requests and for static assets.static java.lang.String
HOSTNAME
The hostname that application should use when constructing an absolute URL.static java.lang.String
HOSTPORT
The hostport that application should use when constructing an absolute URL.static java.lang.String
HOSTPORT_SECURE
The secure (https) hostport that application should use when constructing an absolute URL.static java.lang.String
MIN_GZIP_SIZE
Minimum output stream size, in bytes, before output is compressed using GZIP.static java.lang.String
PRODUCTION_MODE
Indicates whether Tapestry is running in production mode or developer mode.static java.lang.String
SESSION_LOCKING_ENABLED
If true (the default), then Tapestry will apply locking semantics around access to theHttpSession
.static java.lang.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()
-
-
-
Field Detail
-
HOSTNAME
public static final java.lang.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 java.lang.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 java.lang.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 toHOSTPORT_SECURE
.- Since:
- 5.3
- See Also:
- Constant Field Values
-
CLUSTERED_SESSIONS
public static final java.lang.String CLUSTERED_SESSIONS
If "true" then at the end of each request theSessionPersistedObjectAnalyzer
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 istrue
, to preserve 5.2 behavior. For non-clustered applications (the majority), this value should be overridden tofalse
. A future release of Tapestry may change the default.- Since:
- 5.3
- See Also:
- Constant Field Values
-
SESSION_LOCKING_ENABLED
public static final java.lang.String SESSION_LOCKING_ENABLED
If true (the default), then Tapestry will apply locking semantics around access to theHttpSession
. 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 java.lang.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 java.lang.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 java.lang.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 java.lang.String CONTEXT_PATH
Identifies the context path of the application, as determined fromServletContext.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 java.lang.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 java.lang.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 java.lang.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 java.lang.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
-
CORS_ENABLED
public static final java.lang.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 setCORS_ALLOWED_ORIGINS
.- Since:
- 5.8.2
- See Also:
CorsHandler
,CorsHttpServletRequestFilter
, Constant Field Values
-
CORS_ALLOWED_ORIGINS
public static final java.lang.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 ofCorsHandlerHelper.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:
- Constant Field Values
-
CORS_ALLOW_CREDENTIALS
public static final java.lang.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 isfalse
. This is used by the default implementation ofCorsHandlerHelper.configureCredentials(javax.servlet.http.HttpServletResponse)
.- Since:
- 5.8.2
- See Also:
- Constant Field Values
-
CORS_ALLOW_METHODS
public static final java.lang.String CORS_ALLOW_METHODS
Value to be used in the Access-Control-Allow-Methods in CORS preflight request responses. This is used byCorsHandlerHelper.configureMethods(javax.servlet.http.HttpServletResponse)
. Default value isGET,HEAD,PUT,PATCH,POST,DELETE
.- Since:
- 5.8.2
- See Also:
- Constant Field Values
-
CORS_ALLOWED_HEADERS
public static final java.lang.String CORS_ALLOWED_HEADERS
Value to be used in the Access-Control-Allow-Headers in CORS preflight request responses. This is used byCorsHandlerHelper.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:
- Constant Field Values
-
CORS_EXPOSE_HEADERS
public static final java.lang.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 ofCorsHandlerHelper.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:
- Constant Field Values
-
CORS_MAX_AGE
public static final java.lang.String CORS_MAX_AGE
Value to be used in the Access-Control-Max-Age in responses to preflight CORS requests. This is used byCorsHandlerHelper.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 forCORS_MAX_AGE
.- Since:
- 5.8.2
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
TapestryHttpSymbolConstants
public TapestryHttpSymbolConstants()
-
-