Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Add info for 1.4 and some explanation how it works well with Maven webapp packaging.

...

Code Block
public class CizelgemApplication extends AuthDataApplication {
    @Override
    protected void init() {
        super.init();
        IResourceSettings resourceSettings = getResourceSettings();
        resourceSettings.addResourceFolder("src/main/webapp"); //this path should be changed
        resourceSettings.setResourceStreamLocator(new PathStripperLocator());
    }

David Rosenstrauch

In Wicket 1.4

Two lines in your Wicket init are enough so you can put the HTML in your Maven webapp directory:

Code Block

        IResourceSettings resourceSettings = getResourceSettings();
        resourceSettings.addResourceFolder("");

This works because the default IResourceSettings looks on the servlet context root if the path does not start with a "/". This resource resolution happens in addition to the classpath resolution, so you don't lose any functionality this way.

Brian Topping

Simple Partitioning in Maven Projects

...