Apache Tomcat 11 Configuration Reference (11.0.6) - Runtime attributes

## Runtime attributes

### Table of Contents

- Introduction
- Request attributes
- ServletContext attributes

### Introduction

The following attributes are made available to web applications at runtime. Many of these attributes provide access to Tomcat internals. Attributes that expose Tomcat internals may be explicitly requested by name but are often deliberately not included when requesting a list of available attributes.

### Request attributes

Request attributes are made available to web applications via a call to `ServletRequest.getAttribute(String)`.

Property | Description
--- | ---
`jakarta.servlet.request.cipher_suite` | The Servlet specification defined attribute for the name of the cipher suite being used on an SSL connection.
`jakarta.servlet.request.key_size` | The Servlet specification defined attribute for the key size being used on an SSL connection.
`jakarta.servlet.request.secure_protocol` | The Servlet specification defined attribute for the name of the security protocol (e.g. TLSv1.3) being used on a secured connection.
`jakarta.servlet.request.ssl_session_id` | The Servlet specification defined attribute for the session ID being used for an SSL connection.
`jakarta.servlet.request.ssl_session_mgr` | A Tomcat specific extension to the Servlet specification that provides the session manager being used for an SSL connection.
`jakarta.servlet.request.X509Certificate` | The Servlet specification defined attribute for the array of X509Certificate objects representing the certificate chain presented by our client, if any.
`org.apache.catalina.ASYNC_SUPPORTED` | Does the processing chain (Servlet, Filters, Valves) for the current request support asynchronous processing? Each component in the chain must support asynchronous processing for this to be `true`.
`org.apache.catalina.NAMED` | The name of the target Servlet for the current named dispatch, if any.
`org.apache.catalina.core.DISPATCHER_TYPE` | The current `jakarta.servlet.DispatcherType` for the request.
`org.apache.catalina.core.DISPATCHER_REQUEST_PATH` | The current path (Servlet Info + Path Info) to which the request has been dispatched.
`org.apache.catalina.filters.RemoteIpFilter.secure` | The request attribute that is set to the value of `Boolean.TRUE` if the RemoteIpFilter determines that this request was submitted via a secure channel.
`org.apache.catalina.realm.GSS_CREDENTIAL` | The GSS credential for the currently authenticated user if they have successfully authenticated using SPNEGO authentication.
`org.apache.tomcat.peerAddr` | The request attribute set by the RemoteIpFilter, RemoteIpValve (and may be set by other similar components) that identifies the connection peer IP address.
`org.apache.tomcat.remoteAddr` | The request attribute set by the RemoteIpFilter, RemoteIpValve (and may be set by other similar components) that identifies for the connector the remote IP address claimed to be associated with this request when a request is received via one or more proxies. It is typically provided via the X-Forwarded-For HTTP header.
`org.apache.tomcat.request.forwarded` | The request attribute that is set to the value of `Boolean.TRUE` by the RemoteIpFilter, RemoteIpValve (and other similar components) that identifies a request which been forwarded via one or more proxies.
`org.apache.tomcat.sendfile.end` | The request attribute that can be used by a servlet to pass to the connector the end offset (not included) of the part of a file that is to be served by sendfile. The value should be `Long`. To serve the complete file the value should be equal to the length of the file.
`org.apache.tomcat.sendfile.filename` | The request attribute that can be used by a servlet to pass to the connector the name of the file that is to be served by sendfile. The value should be a `String` that is the canonical path of the file to be served.
`org.apache.tomcat.sendfile.start` | The request attribute that can be used by a servlet to pass to the connector the start offset of the part of a file that is to be served by sendfile. The value should be a `Long`. To serve the complete file the value should be `Long.valueOf(0)`.
`org.apache.tomcat.sendfile.support` | The request attribute that is set to the value of `Boolean.TRUE` if connector processing this request supports the use of sendfile.

### ServletContext attributes

ServletContext attributes are made available to web applications via a call to `ServletContext.getAttribute(String)`.

Property | Description
--- | ---
`org.apache.catalina.CredentialHandler` | The CredentialHandler (if any) associated with the Realm (if any) that has been explicitly associated with the Context. Realms associated with parent containers (Hosts or Engines) are not considered.
`org.apache.catalina.deploy.alt_dd` | The alternate deployment descriptor for this web application.
`org.apache.catalina.jsp_classpath` | The class path for our application class loader (as an object of type String), delimited with the appropriate path delimiter for the platform.
`org.apache.catalina.resources` | The WebResourceRoot which is associated with the context.
`org.apache.catalina.webappVersion` | The web application version string (the text that appears after ## when parallel deployment is configured).
`org.apache.tomcat.InstanceManager` | The InstanceManager used to create Servlets, Filters, Listeners etc. for the web application.
`org.apache.tomcat.JarScanner` | The JarScanner instance used to scan the web application for annotations, TLDs, web fragments and similar features.
`org.apache.tomcat.util.threads.ScheduledThreadPoolExecutor` | The utility executor for this Context.