0

There are two war files in tomcat's webapp directory. Passing -DAPP_NAME=XYZ as VM parameter.

And trying to read the value in applicationContext.xml with syntax ${APP_NAME}.

One webapp substituting the value and the other not.

  • One of your webapps is likely configured with Spring's `PropertyPlaceholderConfigurer` with `SYSTEM_PROPERTIES_MODE_OVERRIDE` set and the other one is likely not. Are you able to post your Spring config for both webapps? – Will Keeling May 24 '13 at 20:44

1 Answers1

0

Instead of using syntax ${APP_NAME} I used

 #{ systemProperties['APP_NAME'] } 

and it is working in both the webapps.

There is one difference between two webapps, that is spring-version.

    3.1.0.RELEASE
    3.1.1.RELEASE
    

This syntax ${APP_NAME} is working in webapp with 3.1.1 version. Though upgrading the other app to 3.1.1 version made no difference.