【发布时间】:2015-05-01 16:35:36
【问题描述】:
我正在尝试在我的 war 文件之外读取我的配置文件,因此我在 Websphere 7.1 中声明了一个自定义属性/变量。但是有些 websphere 无法读取变量/令牌。
错误:
2015-04-30 18:19:57,459 错误 [server.startup : 0] [] [] [com.abc.config.admin.ConfigTool] - com.abc.config.AbcConfigException:从文件(${abc.config.dir}/configs)加载配置时出现异常:参数“目录”不是目录
web.xml:
<context-param>
<param-name>secondaryBasePathList</param-name>
<param-value>${abc.config.dir}/configs</param-value>
<description>
Directory/Path where the external files required for the
configuration framework
</description>
</context-param>
我尝试了以下方法: 1. 在服务器 JVM 自定义属性中设置属性/令牌(根据 Websphere 文档:https://www-01.ibm.com/support/knowledgecenter/SSAW57_7.0.0/com.ibm.websphere.nd.multiplatform.doc/ info/ae/ae/xrun_jvm.html?cp=SSAW57_7.0.0%2F3-16-5-448)
- 将属性/令牌设置为 websphere 变量(根据 Websphere 文档:https://www-01.ibm.com/support/knowledgecenter/SSAW57_8.5.5/com.ibm.websphere.nd.doc/ae/ucws_rvars_inst.html)
- 在服务器 Web 容器自定义属性中设置属性/令牌(根据 Websphere 文档:https://www-01.ibm.com/support/knowledgecenter/SSAW57_8.5.5/com.ibm.websphere.zseries.doc/ae/rweb_custom_props.html)
以上所有方法都不适合我..
谢谢 禅那
【问题讨论】: