# Undertow Options

CommandBox uses JBoss Undertow to power it's lightweight servlet containers.  Undertow also powers JBoss Wildfly and has a lot of configurable options, not all of which have first-class CommandBox settings.  These low-level settings come in two different categories:

* **Undertow Options** - Settings that apply to the servlet and web server aspects of Undertow
* **XNIO Options** - Part of the underlying XNIO library which powers all low-level I/O in undertow

## Undertow Options

Undertow has its own set of options which can be found here:

{% embed url="<http://undertow.io/javadoc/2.0.x/io/undertow/UndertowOptions.html>" %}

To set an XNIO option that CommandBox doesn't already expose with a first-class setting, you can set them into your `server.json` like so:

```bash
server set runwar.undertowOptions.ALLOW_UNESCAPED_CHARACTERS_IN_URL=true
```

You can also set global XNIO objects that will apply to all servers.  Global options will be appended to server-level options.

```bash
config set server.defaults.runwar.undertowOptions.WORKER_NAME=myWorker
```

## XNIO Options

XNIO (which is a refined version of NIO (Non-blocking I/O) has its own set of options that apply to the low level network transport functions it provides.  You can find the full set of XNIO options here:

{% embed url="<https://javadoc.io/doc/org.jboss.xnio/xnio-api/latest/org/xnio/Options.html>" %}

To set an XNIO option that CommandBox doesn't already expose with a first-class setting, you can set them into your `server.json` like so:

```bash
server set runwar.XNIOOptions.WORKER_NAME=myWorker
server set runwar.XNIOOptions.SSL_ENABLED_PROTOCOLS=TLSv1.3,TLSv1.2
```

You can also set global XNIO objects that will apply to all servers.  Global options will be appended to server-level options.

```bash
config set server.defaults.runwar.XNIOOptions.WORKER_NAME=myWorker
config set server.defaults.runwar.XNIOOptions.SSL_ENABLED_PROTOCOLS=TLSv1.3,TLSv1.2
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://commandbox.ortusbooks.com/5.6.0/embedded-server/configuring-your-server/undertow-options.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
