This page contains Windows bias

About This Page

This page is part of the Azure documentation. It contains code examples and configuration instructions for working with Azure services.

Bias Analysis

Bias Types:
⚠️ powershell_heavy
⚠️ windows_tools
⚠️ windows_first
Summary:
The documentation provides both Linux and Windows instructions for configuring data sources in Tomcat and JBoss on Azure App Service. However, the Windows section is notably more detailed, with extensive PowerShell scripting and Windows-specific file paths and tools (e.g., PowerShell, %HOME%, %LOCAL_EXPANDED%). The Linux instructions are present and generally sufficient, but the Windows configuration is described with more step-by-step detail and custom scripting. Additionally, Windows-specific tools and patterns (PowerShell, .cmd files) are emphasized, and in some sections, the Windows approach is described before the Linux equivalent.
Recommendations:
  • Ensure Linux and Windows instructions are equally detailed, especially for advanced scenarios (e.g., custom Tomcat configuration).
  • Provide Linux shell script examples with the same level of detail as the Windows PowerShell scripts, including error handling and step-by-step explanations.
  • Where possible, present Linux and Windows instructions in parallel or side-by-side, rather than Windows-first.
  • Avoid assuming PowerShell as the default scripting language; offer Bash or sh alternatives for Linux users.
  • Clarify when a tool or pattern is Windows-only and suggest the closest Linux equivalent.
  • Review for any missing Linux-specific troubleshooting or automation tips that are present for Windows.
GitHub Create pull request

Scan History

Date Scan ID Status Bias Status
2025-09-10 00:00 #107 completed ✅ Clean
2025-09-09 00:00 #106 completed ✅ Clean
2025-09-08 00:00 #105 completed ❌ Biased
2025-09-07 00:00 #104 completed ❌ Biased
2025-09-06 00:00 #103 completed ❌ Biased
2025-09-05 00:00 #102 completed ❌ Biased
2025-09-04 00:00 #101 completed ❌ Biased
2025-09-03 00:00 #100 completed ❌ Biased
2025-09-02 00:00 #99 in_progress ❌ Biased
2025-09-01 00:00 #98 in_progress ❌ Biased
2025-08-31 00:01 #97 in_progress ❌ Biased
2025-08-30 00:01 #96 in_progress ❌ Biased
2025-08-29 00:01 #95 completed ❌ Biased
2025-08-28 00:01 #94 in_progress ❌ Biased
2025-08-27 00:01 #93 in_progress ❌ Biased
2025-08-26 00:00 #92 in_progress ❌ Biased
2025-08-25 00:01 #91 in_progress ❌ Biased
2025-08-24 00:00 #90 in_progress ❌ Biased
2025-08-23 00:00 #89 in_progress ❌ Biased
2025-08-22 00:01 #88 completed ❌ Biased
2025-08-21 00:01 #87 in_progress ❌ Biased
2025-08-20 00:01 #86 completed ❌ Biased
2025-08-16 00:00 #82 in_progress ❌ Biased
2025-08-15 00:01 #81 in_progress ❌ Biased
2025-07-13 21:37 #48 completed ✅ Clean
2025-07-13 21:25 #47 cancelled ✅ Clean
2025-07-13 20:48 #44 cancelled ✅ Clean
2025-07-09 13:09 #3 cancelled ✅ Clean
2025-07-08 04:23 #2 cancelled ❌ Biased

Flagged Code Snippets

#### Add the PowerShell configuration script Next, add the configuration script called *configure.ps1* to the *%HOME%_\site* directory with the following code:
If you created a server-level data source, restart the App Service Linux application. Tomcat resets `CATALINA_BASE` to `/home/tomcat` and uses the updated configuration. # [Windows](#tab/windows) You can't directly modify a Tomcat installation for server-wide configuration because the installation location is read-only. To make server-level configuration changes to your Windows Tomcat installation, the simplest way is to do the following on app start: 1. Copy Tomcat to a local directory (`%LOCAL_EXPANDED%`) and use that as `CATALINA_BASE` (see [Tomcat documentation on this variable](https://tomcat.apache.org/tomcat-10.1-doc/introduction.html)). 1. Add your shared data sources to `%LOCAL_EXPANDED%\tomcat\conf\server.xml` using XSL transform. #### Add a startup file Create a file named `startup.cmd` `%HOME%\site\wwwroot` directory. This file runs automatically before the Tomcat server starts. The file should have the following content:
This PowerShell completes the following steps: 1. Check whether a custom Tomcat copy exists already. If it does, the startup script can end here. 2. Copy Tomcat locally. 3. Add shared data sources to the custom Tomcat's configuration using XSL transform. 4. Indicate that configuration was successfully completed. #### Add XSL transform file A common use case for customizing the built-in Tomcat installation is to modify the `server.xml`, `context.xml`, or `web.xml` Tomcat configuration files. App Service already modifies these files to provide platform features. To continue to use these features, it's important to preserve the content of these files when you make changes to them. To accomplish this, use an [XSL transformation (XSLT)](https://www.w3schools.com/xml/xsl_intro.asp). Add an XSL transform file called *configure.ps1* to the *%HOME%_\site* directory. You can use the following XSL transform code to add a new connector node to `server.xml`. The *identity transform* at the beginning preserves the original contents of the configuration file.
Or, you can manually change the setting in the Azure portal: 1. Go to **Settings** > **Configuration** > **Application settings**. 1. Select **New Application Setting**. 1. Use these values to create the setting: 1. **Name**: `CATALINA_BASE` 1. **Value**: `"%LOCAL_EXPANDED%\tomcat"` #### Finalize configuration Finally, you place the driver JARs in the Tomcat classpath and restart your App Service. Ensure that the JDBC driver files are available to the Tomcat classloader by placing them in the */home/site/lib* directory. In the [Cloud Shell](https://shell.azure.com), run `az webapp deploy --type=lib` for each driver JAR: