


As pointed out in the note in <<helloWorld.adoc#_configuration_of_wicket_applications,paragraph 4.2>>, Wicket can be started in two modes, DEVELOPMENT and DEPLOYMENT. When we are in DEVELOPMENT mode Wicket warns us at application startup with the following message:

[source,java]
----
********************************************************************
*** WARNING: Wicket is running in DEVELOPMENT mode.              ***
***                               ^^^^^^^^^^^                    ***
*** Do NOT deploy to your live server(s) without changing this.  ***
*** See Application#getConfigurationType() for more information. ***
********************************************************************
----

As we can read Wicket itself discourages us from using DEVELOPMENT mode into production environment. The running mode of our application can be configured in four different ways. The first one is adding a filter parameter inside deployment descriptor web.xml:

[source,xml]
----
<filter>      
	<filter-name>wicket.MyApp</filter-name>
	<filter-class>org.apache.wicket.protocol.http.WicketFilter</filter-class>
	<init-param>
		<param-name>applicationClassName</param-name>
		<param-value>org.wicketTutorial.WicketApplication</param-value>
	</init-param>
	<init-param>
            <param-name>configuration</param-name>
            <param-value>deployment</param-value>
	</init-param>
</filter>
----

The additional parameter is named _configuration_. The same parameter can be also expressed as context parameter:

[source,html]
----
<context-param>
    <param-name>configuration</param-name>
    <param-value>deployment</param-value>
</context-param>
----

The third way to set the running mode is using system property _wicket.configuration_. This parameter can be specified in the command line that starts up the server:

[source,java]
----
java -Dwicket.configuration=deployment ...
----

The last option is to override getConfigurationType() method in your class that extends WebApplication):

[source,java]
----
public class WicketApplication extends WebApplication
{
    @Override
    public void init()
    {
        super.init();
        // add your configuration here
    }

    @Override
    public RuntimeConfigurationType getConfigurationType()
    {
        return RuntimeConfigurationType.DEPLOYMENT;
    }
}
----

Remember that system properties overwrite other settings, so they are ideal to ensure that on production machine the running mode will be always set to DEPLOYMENT. 

