## 4.1.3.5.1.2.4  Tomcat 10
By default, web applications pushed with SAP Java Buildpack 2 are running in an Apache Tomcat 10 container.
Applications can explicitly define the target application container by using the TARGET\_RUNTIME environment variable in the application's manifest.yml file.
<!-- image -->
## Provided APIs
The tomcat application runtime container provides the following standard APIs:
<!-- image -->
| Runtime   | Full Name                                                             | Supported Specification Version                                                                                                                                                                                                                                                                                             |
|-----------|-----------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| tomcat    | Apache Tomcat 10.1.x  Note Only relevant for SAP Java Build- pack 2! | Java 11 and later Java Servlets 6.0 Java Server Pages (JSP) 3.1 Expression Language (EL) 5.0 Debugging Support for Other Lan- guages 2.0 Java API for WebSocket 2.1 Java Authentication Service Provider Interface for Containers (JASPIC) 3.0 . . . For a full list of specification versions, see: Apache Tomcat Versions |
## Customize the buildpack defaults
SAP Java Buildpack 2 provides some default configurations for the Apache Tomcat 10 application container. They can be customized by the application with the Resource Configuration [page 318] feature.
Below is a list of all the placeholders than can be customized by the application, along with their default values:
| Placeholder                  | Description                                                                                                       |   Default Value |
|------------------------------|-------------------------------------------------------------------------------------------------------------------|-----------------|
| connector.maxHttpHeaderSiz e | The maximum size of the request and response HTTP header, specified in bytes                                      |            8192 |
| connector.maxPartHeaderSiz e | The maximum number of header bytes permitted per part in a request where the content type is multipart/ form-data |             512 |
| connector.maxPartCount       | The maximum total number of parts permitted in a request where the con- tent type is multipart/form-data          |              50 |
| Placeholder                       | Description                                                                                                                                                                                                                                                                                                                                                                                   | Default Value   |
|-----------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------|
| connector.maxThreads              | The maximum number of request proc- essing threads to be created by this Connector, which therefore determines the maximum number of simultaneous requests that can be handled                                                                                                                                                                                                                | 200             |
| connector.encodedSolidusHa ndling | A string value configuring request paths containing a %2f sequence. • When set to reject , these request paths will be rejected with a 400 response. • When set to decode , these request paths will have that sequence de- coded to / at the same time other %nn sequences are decoded. • When set to passthrough , these request paths will be processed with the %2f sequence un- changed. | reject          |
| connector.allowTrace              | A Boolean value that enables or disa- bles the TRACE HTTP method                                                                                                                                                                                                                                                                                                                              | false           |
## Configurations in the manifest.yml file:
- To configure the maximum size of the HTTP header, use:
- To configure the maximum size of a header part, use:
- To configure the maximum number of parts in a request, use:
- To configure the maximum number of request processing threads, use:
- To decode the %2f sequence of the request paths to / , use:
```
env: JBP_CONFIG_RESOURCE_CONFIGURATION: "['tomcat/conf/server.xml': {'connector.maxHttpHeaderSize':1024}]"
```
```
env: JBP_CONFIG_RESOURCE_CONFIGURATION: "['tomcat/conf/server.xml': {'connector.maxPartHeaderSize':256}]"
```
```
JBP_CONFIG_RESOURCE_CONFIGURATION: "['tomcat/conf/server.xml':
```
```
env: {'connector.maxPartCount':40}]"
```
```
env: JBP_CONFIG_RESOURCE_CONFIGURATION: "['tomcat/conf/server.xml':
```
```
{'connector.maxThreads':800}]"
```
```
env:
```
```
JBP_CONFIG_RESOURCE_CONFIGURATION: "['tomcat/conf/server.xml': {'connector.encodedSolidusHandling':'decode'}]"
```
- To enable the TRACE HTTP method, use:
```
env: JBP_CONFIG_RESOURCE_CONFIGURATION: "['tomcat/conf/server.xml': {'connector.allowTrace':true}]"
```
## Configure the maximum number of active sessions
SAP Java Buildpack 2 provides the default configurations for unlimited sessions for the Apache Tomcat 10 application container. They can be customized by the application with the Resource Configuration [page 318] feature. To limit the number of active sessions, set the maxActiveSessions attribute of the Manager element in the application's context.xml file:
```
 Example <Context> <Manager maxActiveSessions="500" /> </Context>
```
## Configure the session timeout value
To set session timeout value of active sessions, set the &lt;session-config&gt; tag in the application's web.xml file:
```
 Example <session-config> <session-timeout>1</session-timeout> </session-config>
```
## Configure the context path attribute
The default value of context path in the server.xml file is "" (Empty String). You can override this default value by using app\_context\_root in the application's manifest.yml file:
```
 Example ... env: JBP_CONFIG_TOMCAT: "[tomcat:{app_context_root: test_context_path}]" ...
```