My Oracle Support Banner

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

Last updated on JUNE 19, 2024

Applies to:

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


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. 



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

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