Development and Deployment Mode- How to configure it

by kinabalu on July 21, 2009

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:

    <context-param>
        <param-name>configuration</param-name>
        <param-value>development</param-value>
    </context-param>

An init-param in the WicketFilter in your web.xml:

    <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:

    java ... -Dwicket.configuration=development

Overriding Application.getConfigurationType() in your Application class:

    @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.

Similar Posts:

Share this:
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • DZone
  • Slashdot
  • Technorati

Leave a Comment

Previous post:

Next post: