World Library  
Flag as Inappropriate
Email this Article

Apache Wicket

Apache Wicket
Developer(s) Apache Software Foundation
Stable release 7.0 / July 28, 2015 (2015-07-28)[1]
Development status Active
Written in Java
Operating system Cross-platform (Java Virtual Machine)
Type Web application framework
License Apache License 2.0
Website .org.apachewicket

Apache Wicket, commonly referred to as Wicket, is a lightweight component-based web application framework for the Java programming language conceptually similar to JavaServer Faces and Tapestry. It was originally written by Jonathan Locke in April 2004. Version 1.0 was released in June 2005. It graduated into an Apache top-level project in June 2007.[2]


  • Rationale 1
  • Design 2
  • Example 3
  • Components 4
  • Releases 5
  • See also 6
  • References 7
    • Notes 7.1
  • External links 8
  • Documentation 9


Traditional model-view-controller (MVC) frameworks work in terms of whole requests and whole pages. In each request cycle, the incoming request is mapped to a method on a controller object, which then generates the outgoing response in its entirety, usually by pulling data out of a model to populate a view written in specialized template markup. This keeps the application's flow-of-control simple and clear, but can make code reuse in the controller difficult.

In contrast, Wicket is closely patterned after stateful GUI frameworks such as Swing. Wicket applications are trees of components, which use listener delegates to react to HTTP requests against links and forms in the same way that Swing components react to mouse and keystroke events. Wicket is categorized as a component-based framework.


Wicket uses plain XHTML for templating (which enforces a clear separation of presentation and business logic and allows templates to be edited with conventional WYSIWYG design tools[3]). Each component is bound to a named element in the XHTML and becomes responsible for rendering that element in the final output. The page is simply the top-level containing component and is paired with exactly one XHTML template. Using a special tag, a group of individual components may be abstracted into a single component called a panel, which can then be reused whole in that page, other pages, or even other panels.

Each component is backed by its own model, which represents the state of the component. The framework does not have knowledge of how components interact with their models, which are treated as opaque objects automatically serialized and persisted between requests. More complex models, however, may be made detachable and provide hooks to arrange their own storage and restoration at the beginning and end of each request cycle. Wicket does not mandate any particular object-persistence or ORM layer, so applications often use some combination of Hibernate objects, EJBs or POJOs as models.

In Wicket, all server side state is automatically managed. You should never directly use an HttpSession object or similar wrapper to store state. Instead, state is associated with components. Each server-side page component holds a nested hierarchy of stateful components, where each component’s model is, in the end, a POJO (Plain Old Java Object)

Wicket is all about simplicity. There are no configuration files to learn in Wicket. Wicket is a simple class library with a consistent approach to component structure.


A Hello World Wicket application, with four files:

The XHTML template.


    Message goes here
The page component that will be bound to the template. It, in turn, binds a child component (the Label component named "message").
package org.WorldHeritage.wicket;

import org.apache.wicket.markup.html.WebPage;
import org.apache.wicket.markup.html.basic.Label;

public class HelloWorld extends WebPage {
     * Constructor
    public HelloWorld() {
        add(new Label("message", "Hello World!"));
The main application class, which routes requests for the homepage to the HelloWorld page component.
package org.WorldHeritage.wicket;

import org.apache.wicket.protocol.http.WebApplication;

public class HelloWorldApplication extends WebApplication {
     * Constructor.
    public HelloWorldApplication() {

     * @see org.apache.wicket.Application#getHomePage()
    public Class getHomePage() {
        return HelloWorld.class;
The servlet application Deployment Descriptor, which installs Wicket as the default handler for the servlet and arranges for HelloWorldApplication to be instantiated at startup.

    Wicket Example


  • Basic components like form, links, repeaters, and so on are built-in. See
  • More are on


Release Date Notes
1.3.7 2009-07-30 [4]
1.4 2009-07-30 " ... a departure from the past where we leave Java 1.4 behind and we require Java 5 as the minimum JDK version. By moving to Java 5 as the required minimum platform, we were able to utilize Java 5 idioms and increase the type safety of our APIs." [5]
1.4.1 2009-08-21 [6]
1.4.9 2010-05-24 "... over fifteen bug fixes and improvements" [7]
1.4.10 2010-08-11 "... over thirty bug fixes and improvements." [8]
1.4.16 2011-02-25 "This is primarily a minor bugfix release on the 1.4.x (stable) branch." [9]
1.4.17 2011-04-02 "This is primarily a minor bugfix release on the 1.4.x (stable) branch." [10]
1.4.18 2011-08-09 "This is primarily a minor bugfix release on the 1.4.x (stable) branch." [11]
1.4.19 2011-10-19 "This is primarily a minor bugfix release on the 1.4.x (stable) branch." [12]
1.5.0 2011-09-07 "Apache Wicket 1.5 has been in development for the last two years and brings many improvements over previous versions." [13]
1.5.1 2011-09-29 "... over 40 bug fixes and 15 improvements."[14]
1.5.2 2011-10-24 "... over 25 bug fixes and 5 improvements."[15]
1.5.3 2011-11-14 "... over 40 bug fixes and improvements."[16]
1.6 2012-09-05 Out-of-the box jQuery integration, complete control over AJAX requests, improved event registration in browsers, support for large datasets, dependency management for client side JavaScript libraries, experimental support for websockets
1.6.3 2013-01-02 jQuery 1.8.2; fixed JavaScript errors in IE7 and IE8.
1.6.4 2013-01-14 jQuery 1.8.3, bootstrap 2.2.2, JSR 303 BeanValidation support, Hierarchical feedback panel

See also


  • Ceregatti Longo, João Sávio (August 26, 2013). Instant Apache Wicket 6 (1st ed.).  
  • Mader, Jochen (March 28, 2012). Wicket: Komponentenbasiert und objektorientiert (1st ed.).  
  • Vaynberg, Igor (May 15, 2011). Apache Wicket Cookbook (1st ed.).  
  • Dashorst, Martijn; Hillenius, Eelco (September 15, 2008). Wicket in Action (1st ed.).  
  • Gurumurthy, Karthik (September 7, 2006). Pro Wicket (1st ed.).  


  1. ^ Apache Wicket - Apache Wicket 7.0 released. Retrieved on 2015-01-27.
  2. ^ Dashorst, Martijn (2007-07-20). "Wicket graduates from Apache Incubation". Retrieved 2008-03-07. 
  3. ^ Carleton, Daniel (2007-10-12). "Java Web Development the Wicket Way". DevX. Archived from the original on 10 March 2008. Retrieved 2008-03-07. 
  4. ^ Apache Wicket - Apache Wicket 1.3.7 marks end of life for Wicket 1.3. Retrieved on 2013-08-13.
  5. ^ Apache Wicket - Apache Wicket 1.4 takes typesafety to the next level. Retrieved on 2013-08-13.
  6. ^ Apache Wicket - Wicket 1.4.1 released. Retrieved on 2013-08-13.
  7. ^ Apache Wicket - Wicket 1.4.9 released. Retrieved on 2013-08-13.
  8. ^ Apache Wicket - Wicket 1.4.10 released. Retrieved on 2013-08-13.
  9. ^ Apache Wicket - Wicket 1.4.16 released. Retrieved on 2013-08-13.
  10. ^ Apache Wicket - Wicket 1.4.17 released. Retrieved on 2013-08-13.
  11. ^ Apache Wicket - Wicket 1.4.18 released. Retrieved on 2013-08-13.
  12. ^ Apache Wicket - Wicket 1.4.19 released. Retrieved on 2013-08-13.
  13. ^ Apache Wicket - Apache Wicket releases Wicket 1.5. Retrieved on 2013-08-13.
  14. ^ Apache Wicket - Wicket 1.5.1 released. Retrieved on 2013-08-13.
  15. ^ Apache Wicket - Wicket 1.5.2 released. Retrieved on 2013-08-13.
  16. ^ [2]

External links

Introductory articles

  • IBM Wicket: A simplified framework for building and testing dynamic Web pages
  • A First Look at the Wicket Framework
  • The Server Side discussion on Wicket 1.0
  • The Server Side discussion
  • Javalobby interview with Martijn Dashorst (project chairman)
  • Wicket introduction presentation by Martijn Dashorst


  • Wicket in Action
  • Martijn Dashorst
  • Bruno Borges
  • Wicket in Action
  • Mystic Coders


  • Reusable components and patterns for Wicket
  • Site that has live demos and a repository of components
  • Wiki with how-tos, a manual and more
  • Plethora of examples of using Wicket in the real world
  • A free and comprehensive user guide to Wicket
This article was sourced from Creative Commons Attribution-ShareAlike License; additional terms may apply. World Heritage Encyclopedia content is assembled from numerous content providers, Open Access Publishing, and in compliance with The Fair Access to Science and Technology Research Act (FASTR), Wikimedia Foundation, Inc., Public Library of Science, The Encyclopedia of Life, Open Book Publishers (OBP), PubMed, U.S. National Library of Medicine, National Center for Biotechnology Information, U.S. National Library of Medicine, National Institutes of Health (NIH), U.S. Department of Health & Human Services, and, which sources content from all federal, state, local, tribal, and territorial government publication portals (.gov, .mil, .edu). Funding for and content contributors is made possible from the U.S. Congress, E-Government Act of 2002.
Crowd sourced content that is contributed to World Heritage Encyclopedia is peer reviewed and edited by our editorial staff to ensure quality scholarly research articles.
By using this site, you agree to the Terms of Use and Privacy Policy. World Heritage Encyclopedia™ is a registered trademark of the World Public Library Association, a non-profit organization.

Copyright © World Library Foundation. All rights reserved. eBooks from Project Gutenberg are sponsored by the World Library Foundation,
a 501c(4) Member's Support Non-Profit Organization, and is NOT affiliated with any governmental agency or department.