This post applies to Wicket 6.
Most components in Wicket consist of a Java class and a corresponding HTML markup file. By default, Wicket looks for the HTML markup for a component directly next to it in the Java classpath. For most cases, this is a reasonable configuration. However, for the few cases in which you want Wicket to look for the HTML markup files in another location, here is how.
Add the following line to the init()-method of your Application class:
getResourceSettings().getResourceFinders() .add(new WebApplicationPath(getServletContext(), "/"));
The result is that you can put your HTML files directly in the web archive path(in a Maven project this would be src/main/webapp) instead of into the classpath. If you use a Path instead of a WebApplicationPath, you could also put your files somewhere on the filesystem of the server. Also, you can implement your own IResourceFinder.