您可以在的方法中使用
java.util.Properties
(或commons-configuration)加载属性。ServletContextListener``contextInitialized(..)
<listener>
在web.xml中注册侦听器然后将储存
Properties
到ServletContext
(您可以从事件中获取)(ctx.setAttribute("properties", properties)然后使用
${applicationScope.properties.propName}(如BalusC所述,applicationScope
是可选的)访问属性



