<dependency>
<groupId>org.apache.wicket</groupId>
<artifactId>wicket-core</artifactId>
<version>9.2.0</version>
</dependency>
public class MyWicketApp extends Application {
@Override
protected void init() {
super.init();
getMarkupSettings().setStripWicketTags(true);
}
}
public class MyCustomPanel extends Panel {
public MyCustomPanel(String id) {
super(id);
add(new Label("message", "Hello Wicket!"));
}
}
@Override
protected void init() {
super.init();
getComponentInstantiationListeners().add(new GuiceComponentInjector(this));
mountPage("/mypage", MyPage.class);
}
public class MyPage extends WebPage {
public MyPage() {
super();
add(new MyCustomPanel("myPanel"));
}
}
public class Main {
public static void main(String[] args) {
MyWicketApp app = new MyWicketApp();
WicketServer server = new WicketServer(app);
server.run();
}
}