you can put them into your web.xml file:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<display-name>MyApp</display-name>
<context-param>
<param-name>tapestry.supported-locales</param-name>
<param-value>de</param-value>
</context-param>
..
</web-app>
bongosdude schrieb:
hardcoded value in AppModule.contributeApplicationDefaults method is not a
best practice.
class AppModule {
......
public static void contributeApplicationDefaults(
MappedConfiguration<String, String> configuration ) {
configuration.add( SymbolConstants.SUPPORTED_LOCALES, "de,en" );
configuration.add( "tapestry.default-cookie-max-age", "31536000" );
configuration.add( SymbolConstants.PRODUCTION_MODE, "false" );
}
}
I would like to put those values: PRODUCTION_MODE, cookie-max-age and
SUPPORTED_LOCALES in a properties file (i.e. app.properties) and then get
the values from that file. So in QA, dev, the value of PRODUCTION_MODE
should be false, but in production the value should be true.
How can I inject appropriate value from app.properties file?
i.e @Inject Message message;
Thank for any suggestion
-B
-----
B Amigo:super:
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org