Search code examples
javawebsphere

IBM Websphere 8.5 not adding web container custom properties to System


according to the IBM WAS documentation I have read, any custom properties added to the web container will appear in the Java System.getProperties() collection.

So, on my local DEV environment, I configure these properties in the WAS console via:

Application servers-->(servername)-->Web container-->Custom properties

However, on a customer's environment, these custom properties are not appearing in the Java System.getProperties() collection. The customer had to add them directly to the JVM properties.

The reason we need these properties is because we've written a global servlet context listener (e.g. configured via the listeners= parameter in the web container) and its the only mechanism available to give a global listener any configuration parameters.

Is there some obscure WAS 8.5 setting which governs this behavior?


Solution

  • This sounds like it is working as designed. To set a property accessible via System.getProperties() you would configure via JVM Custom Properties. This is a separate set of properties than the Web Container custom properties.