A new baseline
Java 21Jakarta Servlet 6.1Spring 7
Wicket 10 applications already use jakarta.servlet: the step up is your JDK and container.
Write less, achieve more.
A component-oriented Java web framework: plain Java, plain HTML, no JavaScript build chain.
11.0.0 current10.11.0 LTS Release lines and support
8.x and 9.x are out of service since 11.0.0 — how to upgrade
Java builds the tree with add(...), the HTML has the same nesting, and each wicket:id names the component that renders its tag. AddressPanel is written once, with its own markup, and the form uses it twice: the ribbon branches into the same shape for billing and shipping.
OrderPage.java
public class OrderPage extends WebPage {
public OrderPage() {
add(new Label("message", "Check both addresses."));
Form<Void> form = new Form<>("order");
form.add(new AddressPanel("billing", billingAddress));
form.add(new AddressPanel("shipping", shippingAddress));
form.add(new Button("save"));
add(form);
}
}
AddressPanel.java
public class AddressPanel extends Panel {
public AddressPanel(String id, IModel<Address> address) {
super(id, new CompoundPropertyModel<>(address));
add(new TextField<String>("street"));
add(new TextField<String>("city"));
}
}
OrderPage.html
<html>
<body>
<p wicket:id="message">Message</p>
<form wicket:id="order">
<div wicket:id="billing"></div>
<div wicket:id="shipping"></div>
<button wicket:id="save">Save</button>
</form>
</body>
</html>
AddressPanel.html
<wicket:panel>
<input wicket:id="street">
<input wicket:id="city">
</wicket:panel>
Point at a component, or tab to the tree and use the arrow keys, to follow it from its Java line to its tag.
OrderPage.javaOrderPage.html
new Label("message", …)<p wicket:id="message">new Form<>("order")<form wicket:id="order">
new AddressPanel("billing", billingAddress)<div wicket:id="billing">
new TextField<String>("street")<input wicket:id="street">new TextField<String>("city")<input wicket:id="city">new AddressPanel("shipping", shippingAddress)<div wicket:id="shipping">
new TextField<String>("street")<input wicket:id="street">new TextField<String>("city")<input wicket:id="city">new Button("save")<button wicket:id="save">Both panels render AddressPanel.html, the panel's own markup inside <wicket:panel>.
The component tree is where Wicket starts. Ajax, security and testing work on that same tree, from the same Java.
Update parts of a page from Java. Wicket re-renders only the components you add to the request.
CounterPage.java
Label count = new Label("count", () -> clicks);
add(count.setOutputMarkupId(true));
add(new AjaxLink<Void>("increment") {
@Override
public void onClick(AjaxRequestTarget target) {
clicks++;
target.add(count);
}
});
A strict Content Security Policy without unsafe-inline: every header contribution gets a nonce automatically. URLs do not expose your model.
MyApplication.java
@Override
protected void init() {
super.init();
// CSP is on by default; allow one extra image host
getCspSettings().blocking()
.add(CSPDirective.IMG_SRC,
"https://images.example.org");
}
WicketTester renders pages and components in a plain unit test: no browser, no container. Check markup, click links, submit forms.
HelloWorldTest.java
WicketTester tester =
new WicketTester(new MyApplication());
tester.startPage(HelloWorld.class);
tester.assertLabel("message", "Hello World!");
Wicket 1.0 came out on SourceForge in 2005. The component model it introduced is the one in Wicket 11.
Java 21Jakarta Servlet 6.1Spring 7
Wicket 10 applications already use jakarta.servlet: the step up is your JDK and container.
Encrypted URLs and stored pages cannot be altered unnoticed, model values in markup are escaped consistently, and CSP covers script-src-attr and style-src-attr.
One compact state object per component: in the benchmarks, reading state is 30 to 45% faster and a tree with Ajax behaviors serializes about 40% smaller.
An opt-in plain JavaScript Ajax engine with the same client-side API. jQuery stays the default and now supports jQuery 4.
Generate a ready-to-run Maven project with the quick start, or add Wicket to the build you already have.
Open the quick start<dependency>
<groupId>org.apache.wicket</groupId>
<artifactId>wicket-core</artifactId>
<version>11.0.0</version>
</dependency>
<dependency>
<groupId>org.apache.wicket</groupId>
<artifactId>wicket-core</artifactId>
<version>10.11.0</version>
</dependency>
Starting with Apache Wicket 11.0, Wicket moves to time-based releases: a new major release every three months, and an LTS release once a year. Wicket 10 is our current LTS and remains supported until the release of Wicket 14, expected in the first week of July 2027.