The Seam documentation would have you believe that if you define a property in web.xml, or through a -D argument, it will find it and automatically set it on your bean. So if you have a bean called gateway with a property login and a setter, you can make a property called gateway.login in seam.properties, but if you define it in a -D, you have to use org.seam.properties.gateway.login. I got that to work (with the -D that is), but I could not get it to see either &Parameter or &Environment definitions from in context.xml.
I am doing this because I have keys to a merchant gateway that I cannot have in a text file in the project, and would rather not have in catalina.sh, since that might be used for other apps. The nice thing about context.xml is that it's on the server and it can be confined to the one application that uses the gateway.
You should use the
<Parameter/>
option, not<Environment/>
(to the best of my knowledge Seam does not search initialization parameters in JNDI). Thename
property should not include theorg.jboss.seam.properties
prefix (it is only for -D entries), so you should use:override="false"
means that the value set here will have priority over equivalent<context-param/>
tags inweb.xml
, if they exist (if you don't use theoverride
option, context parameters defined inweb.xml
have priority over the one incontext.xml
).