My Oracle Support Banner

Using Environment Variable Substitution in web.xml For <context-param> Element (Doc ID 2279311.1)

Last updated on JULY 28, 2023

Applies to:

Oracle WebLogic Server - Version 12.1.3.0.0 and later
Information in this document applies to any platform.

Goal

Does Weblogic Server supports using environment variable substitution in web.xml for context parameter value?

For example, assume we have below snippet of web.xml.

We expect below Java code returns value already set by Weblogic Server start script through Java command line -D options, for example, -DurlPrefix=https 

{App_Home} = context.getInitParameter("{App_Home}");   // return 'https'

Is this Weblogic Server supported? We have tested with Tomcat, it works. 

 

Solution

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Goal
Solution


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.