Sunday, August 5, 2007

Wicket - Development Mode

clipped from cwiki.apache.org

My application says "DEVELOPMENT MODE", how do I switch to production?

Add the following to your web.xml, inside your <servlet> mapping (or <filter> mapping if you're using 1.3.x):

<init-param>
<param-name>configuration</param-name>
<param-value>deployment</param-value>
</init-param>

You can alternatively set this as a <context-param> on the whole context.

Another option is to set the "wicket.configuration" system property to either "deployment" or "development". The value is not case-sensitive.

The system property is checked first, allowing you to add a web.xml param for deployment, and a command-line override when you want to run in development mode during development.

You may also override Application.getConfigurationType() to provide your own custom switch, in which case none of the above logic is used. See WebApplication.getConfigurationType() for the default logic used above.

0 comments: