# Externalize Oasis Properties for Tomcat in Windows

This article outlines the steps to externalize the **oasis.properties** file by configuring Apache Tomcat as a Windows service. Externalizing configuration files allows for simplified updates and consistent environment setup across deployments.

{% hint style="info" %}
If Apache Tomcat is already running as a service, skip the service installation step outlined in Section **2.1**.
{% endhint %}

## Prerequisites

* Tomcat installed at:\
  `C:\ovaledge\apache-tomcat-10.1.40\`
* **oasis.properties** file extracted from:\
  `C:\ovaledge\apache-tomcat-10.1.40\webapps\ovaledge\WEB-INF\classes`
* Administrative access to the server.
* Ensure Tomcat is not already running as a service before executing the installation steps.

## Configuration Steps

1. Install Tomcat as a Windows Service (if not already installed)
   * Open Command Prompt as **Administrator**.
   * Navigate to the following directory:

     ```sh
     cd C:\ovaledge\apache-tomcat-10.1.40\bin
     ```
   * Run the following command to install Tomcat as a service:

     ```cmd
     service.bat install tomcat10
     ```

     <div data-gb-custom-block data-tag="hint" data-style="info" class="hint hint-info"><p>This creates a new Windows service named <strong>tomcat10</strong>. The service can be configured to start automatically during system boot.</p></div>

     *Sample Reference Screenshot:*

     <figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXd4zizDVxLE9dT1HfJw1A9dNNsLWxXrV2ZBHGpvreASsOTGCuldkrqYcwsr9NSkJ4NaQEPSzXsvR6tPOjbgd9wbG93OvfaumwHCkJYLFyjTso8m1cicLpNUr_OgOkw66dl2Zr5DEw?key=wORqFABHR591-LOeDWUsKg" alt=""><figcaption></figcaption></figure>

2. Create External Properties Directory
   * Navigate to:

     ```cmd
     C:\ovaledge
     ```
   * Create a directory named:

     ```cmd
     extprop
     ```

     \
     *Sample Reference Screenshot:*<br>

     <figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXekCtPL9YtVP0Lm3vuOM1ar1N3AonXFkU1g7DqX9SwJ86MmICuFj6V-DRbH07kF8sNJqNHTmBIj2YMqPnHabYBTmSs95-5ktKO6JQY1lQXG5JVPVUsulQAcCHb52eNUikjmzph5Kg?key=wORqFABHR591-LOeDWUsKg" alt=""><figcaption></figcaption></figure>
   * Copy the **oasis.properties** file from the following source path:\
     `C:\ovaledge\apache-tomcat-10.1.40\webapps\ovaledge\WEB-INF\classes\`

     \
     *Sample Reference Screenshot:*

     <figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXfF7ekuDPrSstUjI37GCz4CEBpD5BeJPKTLXxyAB7AzEllihE_RvwfvaEY2NYg5zC-yi84nMCBSAD-rRJR1lfPjRAxRoIqwd2xSWJBnPHpTX1s8jO52b8IcvTy_N68xcmzUk39s?key=wORqFABHR591-LOeDWUsKg" alt=""><figcaption></figcaption></figure>

     <br>

     To:\
     `C:\ovaledge\extprop\`

     \
     \&#xNAN;*Sample Reference Screenshot:*

     <figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXdYMkDbKbJTPi8zUsVn6xjrluxEWKHijiWZWqlekAeBvfGngcfVf_-odwH6LSs34iY-EzzAdtvS2RxPf-D7D7tFcDxNgt9CX0blgfwkC3vcObxS2OZSxNYuhpLzGd4mpcwsF8SHkQ?key=wORqFABHR591-LOeDWUsKg" alt=""><figcaption></figcaption></figure>

3. Configure Tomcat Service Parameters
   * There are two ways to configure the Java options for the Tomcat service:
     * Option 01: Use GUI (Tomcat Monitor Tool)
       * Navigate to:\
         `C:\ovaledge\apache-tomcat-10.1.40\bin`
       * Double-click **tomcat10w\.exe**.
     * Option 02: Use Command Line
       * Open Command Prompt in the **bin** directory.
       * Execute the following command:

         ```cmd
         tomcat10w.exe //ES/<service_name>
         ```

4. Add Java Options
   * In the **Java** tab, add the following Java options (one per line):

     ```
     -Duse.http=true
     -DOVALEDGE_SECURITY_TYPE=db
     -Dext.properties.dir=file:C:\ovaledge\extprop\
     -Dlog4j.configuration=file:C:\ovaledge\extprop\log4j.properties
     -DOVALEDGE_ENCRYPT_DECRYPT_KEY=BtXKvoinYAWUf
     --add-opens java.base/jdk.internal.loader=ALL-UNNAMED
     --add-opens jdk.zipfs/jdk.nio.zipfs=ALL-UNNAMED
     --add-opens java.base/java.net=ALL-UNNAMED
     --add-opens java.base/java.time=ALL-UNNAMED
     --add-opens java.base/java.nio=ALL-UNNAMED
     ```

5. Configure Java Heap Memory
   * In the **Java** tab:

     * Set the **Initial memory pool** to `5120 MB`.
     * Set the **Maximum memory pool** to `7168 MB`.

     *Sample Reference Screenshot:*

     <div align="left"><figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXdvtnN-PCe9-x2rsq7l0spG3tEGyotH0zRiEtzUwKYRfM5E-7FXPFWkxkL2UQDQEK29dk_tFCSaC-EL3OMJNWwTaN2ggqwQ5NUe1QTwoAAJa-CpALgqVm3M0aVsUEWZgkUMd0TP?key=wORqFABHR591-LOeDWUsKg" alt=""><figcaption></figcaption></figure></div>

6. Save and Apply Settings
   * Click the **OK** button to save the configuration.
   * This completes the setup to externalize **Oasis properties**.

## Validation

* Restart the **Tomcat10** service from the Windows Services Console or use the following command:

  ```cmd
  net stop tomcat10 && net start tomcat10
  ```
* Verify that Tomcat picks up the external **oasis.properties** from:\
  `C:\ovaledge\extprop\`

## &#x20;Rollback Instructions

To revert changes:

1. Remove the external properties parameters from **tomcat10w\.exe**.
2. Delete the `C:\ovaledge\extprop\` directory (optional).
3. Restore the original **oasis.properties** inside:\
   `C:\ovaledge\apache-tomcat-10.1.40\webapps\ovaledge\WEB-INF\classes`

***

Copyright © 2025, OvalEdge LLC, Peachtree Corners, GA, USA.


---

# 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.ovaledge.com/release8.1/deployment-and-maintenance/configuration/externalize-oasis-properties-for-tomcat-in-windows.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.
