简体   繁体   English

IBM Websphere 8.5未将Web容器定制属性添加到系统

[英]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. 根据我阅读的IBM WAS文档,添加到Web容器的任何自定义属性都将出现在Java System.getProperties()集合中。

So, on my local DEV environment, I configure these properties in the WAS console via: 因此,在我的本地DEV环境中,我通过以下方式在WAS控制台中配置这些属性:

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. 但是,在客户的环境中,这些自定义属性出现在Java System.getProperties()集合中。 The customer had to add them directly to the JVM properties. 客户必须将它们直接添加到JVM属性中。

The reason we need these properties is because we've written a global servlet context listener (eg configured via the listeners= parameter in the web container) and its the only mechanism available to give a global listener any configuration parameters. 我们需要这些属性的原因是因为我们已经编写了一个全局servlet上下文侦听器(例如,通过Web容器中的listeners =参数进行配置),并且它是唯一可以为全局侦听器提供任何配置参数的机制。

Is there some obscure WAS 8.5 setting which governs this behavior? 是否存在一些晦涩的WAS 8.5设置来控制此行为?

This sounds like it is working as designed. 这听起来像是按设计工作。 To set a property accessible via System.getProperties() you would configure via JVM Custom Properties . 要设置可通过System.getProperties()访问的属性,可以通过JVM Custom Properties进行配置。 This is a separate set of properties than the Web Container custom properties . 这是一组独立于Web容器自定义属性的属性

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM