This content has been marked as final.
Show 2 replies
-
1. Re: Deployment Descriptors & System Properties Subsitution
norman.richards Jun 9, 2004 5:06 PM (in response to jiwils)Amazingly, it does work in most all the XML files. I wouldn't recommend using it in your web.xml, but you certainly could if you wanted to.
-
2. Re: Deployment Descriptors & System Properties Subsitution
jardia Jun 25, 2004 9:32 AM (in response to jiwils)Hmmm,
did you actually test this in any of the standard deployment descriptors (application.xml, ejb-jar.xml, web.xml)?
I just tried it:
ejb-jar.xml<env-entry> <env-entry-name>testEnvEntry</env-entry-name> <env-entry-type>java.lang.String</env-entry-type> <env-entry-value>${test.replaceme}</env-entry-value> </env-entry>
beanSystem.out.println("!!! " + System.getProperty("test.replaceme")); try { InitialContext ic = new InitialContext(); String test = (String)ic.lookup("java:comp/env/testEnvEntry"); System.out.println("!!! env entry = " + test); } catch(NamingException ne) { ne.printStackTrace(); }
run.batset JAVA_OPTS=%JAVA_OPTS% -Dtest.replaceme=REPLACED_VALUE
output15:36:39,171 INFO [STDOUT] !!! REPLACED_VALUE 15:36:39,171 INFO [STDOUT] !!! env entry = ${test.replaceme}
The system property is set.
The reference to it in the deployment descriptor does not work.
Am i missing something?
Have others seen it work elswhere?
JBoss3.2.3
cheers