Externalize Oasis Properties for Tomcat in Windows
Was this helpful?
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.
If Apache Tomcat is already running as a service, skip the service installation step outlined in Section 2.1.
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.
Install Tomcat as a Windows Service (if not already installed)
Open Command Prompt as Administrator.
Navigate to the following directory:
cd C:\ovaledge\apache-tomcat-10.1.40\binRun the following command to install Tomcat as a service:
service.bat install tomcat10This creates a new Windows service named tomcat10. The service can be configured to start automatically during system boot.
Sample Reference Screenshot:
Create External Properties Directory
Navigate to:
C:\ovaledgeCreate a directory named:
extpropSample Reference Screenshot:
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:
To:
C:\ovaledge\extprop\
Sample Reference Screenshot:
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:
tomcat10w.exe //ES/<service_name>Add Java Options
In the Java tab, add the following Java options (one per line):
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:
Save and Apply Settings
Click the OK button to save the configuration.
This completes the setup to externalize Oasis properties.
Restart the Tomcat10 service from the Windows Services Console or use the following command:
Verify that Tomcat picks up the external oasis.properties from:
C:\ovaledge\extprop\
To revert changes:
Remove the external properties parameters from tomcat10w.exe.
Delete the C:\ovaledge\extprop\ directory (optional).
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.
Was this helpful?
Was this helpful?
-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-UNNAMEDnet stop tomcat10 && net start tomcat10
