Build web applications from Java components and plain HTML
Apache Wicket is a component-oriented Java web framework, open source since 2004 and a project of the Apache Software Foundation since 2007. Every component keeps its behaviour and state in Java and its markup in plain HTML, so there is no JavaScript build chain to maintain.
- LTS
- 10.11.0 LTS supported until Jul 2027
- Last release coming
- 9.24.0 · 8.19.0 one final release each, then end of life. See the upgrade paths.
- Everything else
- All releases and downloads
From the blog
-
Wicket 8 and 9 reach end of life soon
Wicket 8.x and 9.x each get one final release and then reach end of life, and with them Wicket's support for javax.servlet. Move to Wicket 10 LTS, supported until July 2027. -
A new release cadence for Apache Wicket
Starting with Apache Wicket 11.0, due in the first week of October 2026, Wicket moves to time-based releases: a new major release every three months, and an LTS... -
A security policy for Apache Wicket
Wicket now documents how to report a vulnerability, what is in scope, and which inputs the framework trusts, in a SECURITY.md on every supported branch.
A page is a Java class and an HTML file
public class HomePage extends WebPage {
private int clicks;
public HomePage() {
add(new Link<Void>("count") {
@Override
public void onClick() {
clicks++;
}
});
add(new Label("clicks", () -> clicks));
}
}<p>
You clicked <span wicket:id="clicks">0</span> times.
<a wicket:id="count">Click me</a>
</p>- The
wicket:idjoins each tag to the Java component with the same id. The HTML stays plain HTML that any editor opens. - A click runs
onClick()on the server, and Wicket renders the page again. - The field
clickskeeps its value between requests, because Wicket keeps the page object for you. - A part you reuse on many pages is a
Panel: again a Java class and an HTML file. Components and markup shows how.
Why Wicket
-
Just Java and HTML
Use what you know about Java and your favourite HTML editor. Behaviour lives in Java, markup stays plain HTML, and no JavaScript build is needed.
-
Secure by default
URLs do not expose sensitive information and component paths are session-relative. Wicket supports a Content Security Policy without
unsafe-inline: it adds a nonce to every header contribution itself. -
Ajax without writing JavaScript
Update selected parts of a page without a single line of JavaScript, with a large set of ready-made Ajax components.
-
Components you can reuse
Pages and components are real Java objects with encapsulation, inheritance and events. Bundle a component with its stylesheets, JavaScript and other resources into one reusable package.
-
Tests without a browser
WicketTester renders your pages and components in a unit test, without a browser or a container, and checks their markup, attributes and contents.
-
Stable for the long run
Open source under the Apache License since 2004. Breaking changes only when needed, deprecated alternatives kept where possible, and every change documented in the migration guide.
Coming from Spring MVC, Jakarta Faces or Vaadin? Why component-oriented compares Wicket with request-based and other component frameworks, what it gains and what it costs, and the glossary gives each Wicket term with what other frameworks call it.
Also included: translations in over 25 languages, safe use of multiple tabs and windows, injection with CDI, Spring and Guice, Jakarta EE integration, and component-local JavaScript and CSS.
Built with Wicket
Many applications run on Wicket without saying so. These say so, collected through the Built with Wicket feed. Submit your own project.
Learn Wicket in five lessons
The lessons build one application, from an empty project to a tested page with Ajax. Every page of the documentation says which Wicket versions it covers.
- Build your first application Generate a project from the quickstart, run it, and build a home page with a label, a click counter and a link to a second page.
- Give every page the same layout Move the header, navigation and footer of your application into a base page and two panels, so every page shares one layout.
- Build a form that saves data Add a guestbook page with a form that validates its input, saves entries and lists them, and shows errors and a confirmation.
- Update a page with Ajax Make the click counter and the guestbook form update only the parts of the page that change, open the form without a reload, and refresh the guestbook every ten seconds.
- Test a page with WicketTester Write JUnit tests that render your pages, click links, submit the guestbook form and check Ajax updates, without a browser or a server.
Built by the people who use it
Apache Wicket is developed in the open by volunteers. Answer a question on the users list, report a bug with a quickstart, improve the documentation, or send a pull request to apache/wicket: a committer reviews it, and it goes out with the next release of its line.