There are four supplied methods in the Wicket framework for changing your configuration from development to deployment and vice-versa. The two possible values for this configuration parameter is “development” or “deployment”.
Method one, context-param in web.xml:
1
2
3
4
<context-param>
<param-name>configuration</param-name>
<param-value>development</param-value>
</context-param>
An init-param in the WicketFilter in your web.xml:
1
2
3
4
5
6
7
8
<filter>
<filter-name>wicketFilter</filter-name>
<filter-class>org.apache.wicket.protocol.http.WicketFilter</filter-class>
<init-param>
<param-name>configuration</param-name>
<param-value>development</param-value>
</init-param>
...
A command-line parameter wicket.configuration:
1
java ... -Dwicket.configuration=development
Overriding Application.getConfigurationType() in your Application class:
1
2
3
4
@Override
public String getConfigurationType() {
return Application.DEVELOPMENT;
}
In our environments, to reduce headache, we have the configuration in web.xml point to “deployment”, and in our Jetty Start class, we pass the command-line parameter locally to make it run in “development” mode.