Global context reference

The following reference tables show the defined paths to available attributes in the global context zones.

App zone

Constant for accessing the App zone of the GlobalContext. Apps are free to use this zone for their own purposes.
Key Type Description Read/Write

Config zone

Constant for accessing the Config zone of the GlobalContext, where the configuration information for the application is contained. Most values within this zone will be loaded from the configuration files of the application or at application startup, and are read-only.
Key Type Description Read/Write
/config/accessLogging boolean Enables/Disables access logging. When enabled, an access log similar to Apache's access log will be written to the logs directory. Read/write
/config/apacheRouteID String This routeID is appended to the zsessionid to make it compatible with apache/mod_proxy. This allows session affinity with Apache to work. See the runtime guide for examples of how to configure. Read-only
/config/channelFramework ChannelFramework Internal reference to the ChannelFramework instance being used for serving network requests. Internal use only. Read-only
/config/compressResponse Indicates if the response should be compressed if accept-encoding is compress or gzip default is enabled
/config/connection/defaults Object Default protocol configuration parameter values for the Connection API. Read-only
/config/connection/destinations List<Map<String, Object>> Configured destinations for the Connection API. Read-only
/config/connection/https List<Map<String, Object>> Outbound HTTPS configurations for the Connection API. Read-only
/config/connection/protocols Map<String, Object> Explicitly registered protocol definition for use with the Connection API. For use by connection protocol implementations. Read-only
/config/contextRoot String The optional application context root uniquely identifies the application. An empty string indicates no context root; otherwise, it starts with a slash. The context root must only contain legal URI characters. Read-only
/config/createDumpOnErrantRequest Boolean Forces a JVM dump to be created if there are any errant requests during a recycle or stop. If a request does not complete within the alloted stop time, it is considered errant. This allows those requests to be corrected, as an errant request can cause significant issues with the application recycle pattern. Read-only
/config/defaultContentType String The default response content type. The default is "text/html;charset=UTF-8". Read-only
/config/dependencies List List of the dependencies by name, with the dependency's root directories as the value. For example, /config/dependencies/foo contains the root directory for dependency "foo". Read-only
/config/exitCode Integer Optional The termination status code set by config event handlers. If set, then the application exits. Read/write for "config" handlers.
/config/externalUriPrefix String The optional external URI prefix. If defined, it replaces the scheme, host and port when calculating absolute URIs. Read-only
/config/fileserver/defaultExtensions List<String> The list of file extensions for default file serving, in search order. The default is [.groovy, .gt, .html]. Read/write
/config/fileserver/directoryBrowsing Boolean Indicates whether directory browsing is enabled. The default is false. Read/write
/config/fileserver/directoryView String Reference to view template/script file used for displaying directories when directory browsing is enabled. (relative to app/views) Read/write
/config/fileserver/expires Map The time, in seconds, that a client should cache files with this extension. It is set in a Cache-Control header. By default, files are sent with a max-age of 0. Always prepended to a file extension like the following: /config/fileserver/expires/.extension Read/write
/config/fileserver/setEtag Boolean Indicates whether the Etag header is set on outgoing static file headers. The default is true. Read/write
/config/http/ipAddress String The ip address to which HTTP should bind. Read-only
/config/http/keepAliveTimeout Integer The TCP/IP keep alive timeout that should be used with new incoming connections. Read-only
/config/http/port Long The HTTP port associated with this application. Read-only
/config/http/readTimeout Integer The timeout for reads that should be used for incoming connections be for considering the request in error. Read-only
/config/https/ipAddress String The ip address to which HTTPS should bind. Read-only
/config/https/port Long The HTTPS port associated with this application. Read-only
/config/https/sslconfig#clientAuthentication boolean Whether the client's SSL certificate should be validated against trust authorities for access. Defaults to false . Read-only
/config/https/sslconfig#keyStore String The location of the keystore file. Read-only
/config/https/sslconfig#keyStorePassword String The password to access the keystore file. Read-only
/config/https/sslconfig#keyStoreType String The encryption type of the keystore file. Allowed types are dependent on the JSSE implementation of the runtime. Read-only
/config/https/sslconfig#trustStore String The location of the truststore file. If a truststore is not defined, the keystore file will be used for both. Read-only
/config/https/sslconfig#trustStorePassword String The password to access the truststore file. Read-only
/config/https/sslconfig#trustStoreType String The encryption type of the truststore file. Allowed types are dependent on the JSSE implementation of the runtime. Read-only
/config/id String The current process id. Read-only
/config/instanceNumber Integer The instance number of the application. For internal use only, and should not be set from configuration files. Read-only
/config/json/converters Map <String, String> Map of class name/converter pairs that are invoked when serializing from/parsing to an instance of the specified class. Key=class name; value=converter implementation class. Read-only
/config/json/derivedConverters Map <String, String> Map of class name/converter pairs that are invoked on superclasses and interfaces after checking the converters first. Key=class name; value=converter implementation class. Read-only
/config/json/prettyPrint Boolean Displays the JSON in a more human readable format. Read-only
/config/json/stringFilters String The implementation class name which handles special filtering of content that may be embedded in the JSON string. Read-only
/config/maxStopTime Integer The maximum time that any single request is allowed after a stop or recycle request is issued. After this timeout is reached, the request will be forcibly stopped. Value is in seconds. Read-only
/config/maxThreads Integer The maximum size of the request threadpool. Read-only
/config/mimeTypes Map <String, String> Map that maps extensions -> content-Type headers This map overrides the default map Read-only
/config/minThreads Integer The minimum size of the request threadpool. Read-only
/config/name String The name of this application. Read-only
/config/properties
/config/requestLogging boolean Enables/Disables request logging. Request logging creates files for each request containing the exact request and response. This should only be enabled in development systems. Read/write
/config/requestLoggingLimit Integer The per request logging limit for the input/output streams. If the limits are reached the request log is truncated. Value in bytes. Read/write
/config/resources/defaultExtensions List<String> A list of file extensions for resource handlers, in search order. The default is [.groovy]. Read/write
/config/root String The root directory of the application. Read-only
/config/runtime/classpath String The classpath used by the application as determined during the resolve process Read-only
/config/runtime/mode String Adjusts the behavior of the runtime depending on the current deployment environment. Valid values are production and development. Read-only
/config/runtime/natives String The path for native dependencies as determined during the resolve process. Read-only
/config/security/cacheControl List The default Cache-Control header for all secured resources and their associated login forms (OpenID, Form-based Login, Single Sign-On) that are provided as part of WebSphere sMash The default Cache-Control header value is ["must-revalidate","max-age=0","private"] Read-only
/config/security/formLoginPage String The uri location of the form login page for form based authentication Read-only
/config/security/jaas/callbackHandler String The JAAS callback handler implementation class used for verifying the credentials of the user. Read-only
/config/security/jaas/configName String The name of the list of maps representing JAAS login modules to be used by the security runtime Read-only
/config/security/jaas/loginModules List<Map> The List containing a map of login modules associated with a specified config name. /config/security/jaas/loginModules/.configName Read-only
/config/security/realm String The realm value returned when a WWW-Authenticate response header is sent to the client. Default value is based upon the authType specified for the security rule Read-only
/config/security/roles List A list of users and/or groups associated with a particular role. /config/security/roles/.role/USERS or /config/security/roles/.role/GROUPS Read-only
/config/security/secretKey String The secret key used to generate encrypted values related to security. Currently leveraged by SimpleToken and CrossSiteRequestForgery (CSRF) tokens Read-only
/config/security/ssoURL String The uri location of the sso login page for Single Sign-On based authentication Read-only
/config/security/token/csrfGlobalPostLoginFallback String Fallback URI when CSRF protection is enabled. After successful login, user will be redirected to this uri. Default is "/" Read-only
/config/security/token/enableCsrfProtection String Key to determine whether cross site request forgery protection should be enabled and at what level. Default value is "", which means that this protection is disabled. Valid values are "" (disabled), "REQUEST" (token generation is automatic, but requires using CSRF API), and "REQUEST_RESPONSE" (transparent rewriting of responses to include CSRF token, requires zero.acf dependency) Read-only
/config/security/token/enableStrongCsrfProtection Boolean Enables stronger support for CSRF protection than what is provided by default. Note requires some additional configuration by the application developer so please read the Developer's Guide for more information. Default is false. Read-only
/config/security/token/ltpa2#keyImportFile String The relative path of the LTPA key import file from the configuration folder of the application. The file is exported by WebSphere Application Server. To learn how to export the LTPA keys, see the Exporting Lightweight Third Party Authentication keys article in the IBM Information Center. Read-only
/config/security/token/ltpa2#keyPassword String The password to extract the LTPA keys from the LTPA key import file. (See Leveraging XOREncoding in Developer's Guide) Read-only
/config/security/token/ltpa2#ssoDomains List List of possible values for the ltpa token cookie domain. Each element in the list will be matched against the server name obtained the request (GlobalContext.zget(Request.serverName)). If the serverName, obtained from the GlobalContext, ends with a value from the list of ssoDomains, the cookie will be created with that domain (first match wins). Read-only
/config/security/token/ltpa2#tokenExpiration Long The expiration limit of the LTPAToken2 in minutes. The default value is 120. Read-only
/config/security/token/securedCookie Boolean Boolean flag to determine whether security cookie should be marked as secured (HTTPs only) or not Default false Read-only
/config/security/token/simple#ssoDomains List List of possible values for the simple token cookie domain. Each element in the list will be matched against the server name obtained the request (GlobalContext.zget(Request.serverName)). If the serverName, obtained from the GlobalContext, ends with a value from the list of ssoDomains, the cookie will be created with that domain (first match wins). Read-only
/config/security/token/simple#tokenExpiration Long The expiration limit of the simple token expiration in minutes. The default value is -1 which will expire the token when the browser is closed. Read-only
/config/security/token/tokenType String The token type generated and validated by the runtime for secured resources Default types are Ltpa2 and and Simple Read-only
/config/security/userservice/file/pathToUserfile String The path to the user registry file for file based user registry The default value is ${config.root}/zero.users Read-only
/config/security/userservice/ldap#fullBaseDNFilterPattern String The filter to search for a user based upon the fully qualified domain name. The default value is "(objectclass=*)" Read-only
/config/security/userservice/ldap#ignoreBaseDN String Boolean flag supports fully qualified domain name (FQDN) lookups. If false, FQDN lookups will be disabled. The default value is true Read-only
/config/security/userservice/ldap#jndiInitialContextFactory String Initial context factory name The default value is "com.sun.jndi.ldap.LdapCtxFactory" Read-only
/config/security/userservice/ldap#jndiProviderUrl String JNDI provider URL Read-only
/config/security/userservice/ldap#jndiSecurityAuthentication String The level of authentication used by JNDI. The default value is "simple". Read-only
/config/security/userservice/ldap#jndiSecurityCredentials String Administrator's credential (See Leveraging XOREncoding in Developer's Guide) Read-only
/config/security/userservice/ldap#jndiSecurityPrincipal String Administrator's principal Read-only
/config/security/userservice/ldap#ldapGroupAttributeType String The attribute type of the group name. The default value is "cn" Read-only
/config/security/userservice/ldap#ldapGroupBaseDn String The base DN of groups. Read-only
/config/security/userservice/ldap#ldapGroupSearchFilterPattern String The filter to search groups to which a user ID belongs. A user ID is embedded in the place holder "{0}" . The default value is "(&(uniqueMember={0}) (objectclass=groupOfUniqueNames))" Read-only
/config/security/userservice/ldap#ldapSearchScope Integer The search scope set to javax.naming.directory.SearchControls: 0(SearchControls.OBJECT_SCOPE) 1(SearchControls.ONELEVEL_SCOPE) 2(SearchControls.SUBTREE_SCOPE) The default value is 2 (SearchControls.SUBTREE_SCOPE) Read-only
/config/security/userservice/ldap#ldapSearchTimeLimit Integer The search time limit, in milliseconds, set to javax.naming.directory.SearchControls. The default value is 3000 Read-only
/config/security/userservice/ldap#ldapSocketFactory String The classname for a custom socket factory implementation used by the LDAP service provider. Read-only
/config/security/userservice/ldap#ldapUserIdBaseDn String The root from which the LDAP user service starts to search a user. Read-only
/config/security/userservice/ldap#ldapUserIdRdnPattern String The pattern of user entries' RDN. A user ID is embedded in the placeholder "{0}" . Read-only
/config/security/userservice/ldap#ldapUserIdSearchFilterPattern String The pattern of the user search filter. A user ID is embedded in the place holder "{0}" . The default value is "(&(uid={0}) (objectclass=inetOrgPerson))" Read-only
/config/security/userservice/registryImpl String The implementation class associated with the registry type /config/security/userservice/registryImpl/.registryType Read-only
/config/security/userservice/registryType String The alias user registry type used by the security runtime The default value is "file". Read-only
/config/task String The task which is being run, or should be run, when the runtime starts. Set by the CLI. Read-only
/config/tasks/defaultExtensions List <String> List of file extensions for CLI task handlers, in search order. Read
/config/tmpDir String The location of a directory for temporary files to be stored. The default is the Java system property java.io.tmpdir. Read-only
/config/userZone/idleTimeout Integer The timeout at which user sessions should be deleted or destroyed. Value is in seconds. Read-only
/config/zso/immediateStart Boolean Whether the ZSO should start the underlying java runtime immediately upon the start of the application. The default is on demand, or false. Read only
/config/zso/jvmargs List<String> The jvm args that should be used when the process is started. This section is further divided by a System property to retrieve, then a String which will be used with .startsWith to determine the list of parameters to add. Read only
/config/zso/recycle/enable Boolean Whether recycle based on maxRequests / idleTimeout is enabled. Setting this to false will disable all automatic recycles, but will not disable the ability to force a recycle via command line or API. Read only
/config/zso/recycle/idleTimeout Integer The default maximum number of seconds to wait after the last request before the Java Runtime recycles. Read only
/config/zso/recycle/maxRequests Integer The default maximum number of requests that should be accepted before the Java runtime recycles. Read only
/idleTimeout Integer The maximum number of requests that should be accepted before the Java runtime recycles per mode. /config/zso/recycle/${/config/runtime/mode}/idleTimeout Read only
/maxRequests Integer The maximum number of requests that should be accepted before the Java runtime recycles per mode. /config/zso/recycle/${/config/runtime/mode}/maxRequests Read only

Connection zone

Key Type Description Read/Write
/connection/configuration Connection handler configuration. Only accessbile within a connection Handler implementation. Read-only
/connection/request/body Connection request body. Only accessible within transmit or getTransport handler, a connection Handler or a protocol Transport implementation. Read/write
/connection/request/headers List<Object> Connection request headers. Only accessbile within transmit or getTransport handler, a connection Handler or a protocol Transport implementation. Read/write
/connection/request/operation String Connection request operation name. Only accessible within transmit or getTransport handler, a connection Handler or a protocol Transport implementation. Read/write
/connection/request/outputStream String Request OutputStream. Only applicable to OutputStream aware protocol Transport implementations. Read/write
/connection/request/protocol/_name String Connection protocol name. Only accessible within transmit or getTransport handler, a connection Handler or a protocol Transport implementation. Read/write
/connection/request/target String Connection request target resource name or URL. Only accessible within transmit or getTransport handler, a connection Handler or a protocol Transport implementation. Read/write
/connection/response/body Connection response body. Only accessible within transmit handler, a connection Handler or a protocol Transport implementation. Read/write
/connection/response/defaultCharset String Default response character encoding suggested by the protocol Transport. Only accessible within transmit handler, a connection Handler or a protocol Transport implementation. Read/write
/connection/response/headers List<Object> Connection response headers. Only accessible within transmit handler, a connection Handler or a protocol Transport implementation. Read/write
/connection/response/status String Connection response status. Only accessible within transmit handler, a connection Handler or a protocol Transport implementation. Read/write
/connection/response/valuePath String Suggested value path the connection infrastructure should used when reading body as String or byte[]. Set by some protocol Transport implementations. Only accessible within transmit handler, a connection Handler or a protocol Transport implementation. Read/write

Event zone

GlobalContext Event zone constants for accessing properties of a fired event.
Key Type Description Read/Write
/event/_name String The event name. Read-only
/event/authType String String representing the authentication type that was associated with this event handler (Basic, Form, SSO, OpenID) Read-only
/event/csrfProtect Boolean Flag used during the token validation process to determine if request is required to be CSRF protected Read-only
/event/done Boolean Indicates that the completion of an event.
/event/groups List The list of groups that are permitting access to this resource. This is available during the authorize event. Read-only
/event/matchedPath String The URI to the current handler. App.contextRoot + Event.matchedPath + Event.pathInfo = decode(Request.uri) Read-only
/event/parentPath String The URI to the parent directory containing the current handler. Read-only
/event/password String The password obtained in the request that is passed to the security handler during the secure event Read-only
/event/pathInfo String The segment of the URI after /event/matchedPath. Decoded. Read-only
/event/remoteGroup String The value of the selector expression variable {remoteGroup}, if applicable to the request URI. Read-only
/event/remoteUser String The value of the selector expression variable {remoteUser}, if applicable to the request URI. Read-only
/event/requireSSL Boolean Flag used during the requireSSL check to determine if request is required to be over SSL Read-only
/event/resolvedHandlers List <Map <String, String>> Contains a List<handlerData> of handlers associated with the event. Read-only
/event/resolvingEvent String The name of the underlying event. Read-only
/event/roles List The list of roles that are permitting access to this resource. This is available during the authorize event. Read-only
/event/task String The name of the invoked CLI task.
/event/uri String The Global Context key requested in the context of a Global Context miss (gcMiss) event. Read-only
/event/username String The username obtained in the request that is passed to the security handler during the secure event Read-only
/event/users List The list of users that are permitting access to this resource. This is available during the authorize event. Read-only

Request zone

GlobalContext Request zone constants used for accessing the properties of a given request.
Key Type Description Read/Write
/request/_csrfGeneratedToken Boolean Flag which tells whether csrf handler generated a CSRF for this request Read-only
/request/_csrfVerifiedUnuthenticatedRequest Boolean Flag which tells whether csrf handler has verified that this request is an unauthenticated request for an unprotected resources Read-only
/request/authType String The type of authentication associated with this request (Basic, Form, RP, SSO). Read-only
/request/connection For use by connection protocol implementations.
/request/cookies/in Map<String, List<Cookie>> The cookies that a client sent. Read-only
/request/cookies/out List<Cookie> The outgoing cookies. To avoid erasing any other cookies, you must get the list and add to it rather than setting this variable.
Example:
Cookie newCookie = new Cookie(name, value);
GlobalContext.get("/request/cookies/out").add(newCookie);
Read/write
/request/error/exception Throwable The exception that was thrown when the error occurred. Read/write
/request/error/message String The error message. Read/write
/request/files Map<String, Map<String, String>[]> Information regarding uploaded files. For the outer map, the key is the name. The client can upload multiple files with the same name. The inner map contains three keys, filename, path, and Content-Type. The filename is the name of the file as defined by the client. The Content-Type is the content-type defined by the client. The path is the location of the file on disk. Read-only
/request/headers/in FirstElementList <String> Values of request headers. Read-only
/request/headers/out FirstElementList <String> Values of response headers. Read/write
/request/headers/sent Boolean Indicates whether the HTTP response headers have been sent. If this value is true, then any changes to /request/headers/out are not sent to the client. Read-only
/request/input InputStream The input stream associated with the HTTP request. Form-encoded parameters are available using /request/params, not on the input stream. Read-only
/request/json/output
/request/locales String The languages and countries sent by the client in the accept-language header Read-only
/request/method String The HTTP request method (GET, POST, PUT, DELETE). Read-only
/request/outputStream OutputStream The binary output stream. This is available only to render handlers. Write for render handlers
/request/params Map<String, String[]> Includes parameters from query string and form-encoded parameters (POST). Read-only
/request/path String The request URI path beyond the context root (see /config/contextRoot). URI decoded. Read-only
/request/protocol String The request protocol (for example HTTP/1.1). Read-only
/request/queryString String The query string associated with the request URI. Read-only
/request/remoteAddress String The IP address of the remote host. Read-only
/request/remoteHost String The name of the remote host. Read-only
/request/remotePort Integer The remote port number. Read-only
/request/requestLog
/request/requestLogName
/request/scheme String The URL scheme (<scheme>://host/path). Read-only
/request/serverName String The host name of the server to which the request was sent. Read-only
/request/serverPort Integer The server port on which the request was received. Read-only
/request/status Integer Status of the response. Read/write
/request/subject/groups List<String> The groups an authenticated user belongs to. Read-only
/request/subject/remoteCodePrincipals List<String> The list of remote code principals user is a member of. Used during CSRF validation. Read-only
/request/subject/remoteUser String The authenticated remote user name. Read-only
/request/subject/roles List<String> The roles an authenticated user belongs to. Read-only
/request/subject/users
/request/uri String The fully qualified request URI, including context-root and query string. URI encoded. Includes (proxy) context root, path, and query string Read-only
/request/view String A path to view script/template (relative to app/views). This is a required field for the ViewHandler renderer. Read/write
/request/writer PrintWriter The text output stream. Write

Tmp zone

Key Type Description Read/Write

User zone

Key Type Description Read/Write
/user#invalidate
/user#save
/user/debug
/user/zsessionid

Version 1.0.0.3.25591