# Installing Inline with an Existing Application

This option is the highest performing and involves installing the Composable Agentic Platform server inline with an existing Web application. This is accomplished using a servlet filter and works with all Java application servers that support the servlet specification 2.3 or later.

To install inline, copy the file `magic-11.0.jar` from the `\integration-examples\jars` folder under the Composable Agentic Platform Server installation to the WEB-INF\lib folder of the target Web application.

Once the copy is completed, you need to update your WEB.XML file to ensure that the Composable Agentic Platform server is started with your target application and is correctly sitting inline before your HTTP request processing by servlets or JSPs.

To do this, edit the `WEB.XML` file and insert the lines highlighted below:

<figure><img src="/files/PXcO5vwonZV5uukRHm5M" alt=""><figcaption><p>web.xml file</p></figcaption></figure>

If you already have filters installed with your target application, you can place the Composable Agentic Platform filter anywhere in the chain that is appropriate. Please note that some application servers (such as IBM WebSphere) require all filters to be listed before the full list of filter mappings. Failure to follow this rule can cause the Web application to fail to load.

Once the files are in place, you must copy the `magic.properties` file from the `\integration-examples\configuration` folder under your Composable Agentic Platform Server installation to the `WEB-INF\classes` folder on your target system. Edit it to suit the configuration being created. As a minimum, you will need to provide a home folder. This should be an empty folder on the local file system that the server has authority to read, write and update. Please see the section [**Understanding the magic.properties configuration settings**](/cap/product-reference/installation-and-configuration/understanding-the-magic.properties-configuration-settings.md) for more detailed explanations of the configuration settings.


---

# 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://docs.tomorrowx.com/cap/product-reference/installation-and-configuration/installing-inline-with-an-existing-application.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.
