Wicket Auto Reloading Classes
April 24, 2008
web.xml
<filter>
<filter-name>wicket</filter-name>
<filter-class>ghost.wicket.apps.MyReloadingFilter</filter-class>
<init-param>
<param-name>applicationClassName</param-name>
<param-value>ghost.wicket.apps.MyWebApplication</param-value>
</init-param>
</filter>
MyReloadingFilter
public class MyReloadingFilter extends ReloadingWicketFilter
{
static
{
ReloadingClassLoader.includePattern(“ghost.wicket.*”);
ReloadingClassLoader.excludePattern(“ghost.wicket.bo.*”);
ReloadingClassLoader.excludePattern(“ghost.wicket.apps.MyWebSession”);
}
}
Simply replace your wicket filter with your custom filter to enable wicket automatically reload your class files on the fly, so that you no need to restart server to update your changes to your class file.
