Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Wicket response filter that validates XHTML markup
Java HTML Eagle JavaScript XSLT CSS Other
Fetching latest commit...
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

Wicket Stuff HTML5 Validator

This project validates the output of your Apache Wicket application while running. It includes a error view showing each validation error, with line-precise error messages.


Validates the following w3c standards:

  • HTML 4.01 Strict
  • HTML 4.01 Transitional
  • XHTML 1.0 Strict
  • XHTML 1.0 Transitional
  • HTML 5

This project includes the HTML validator taken from html validator.


Make sure you use Wicket 6.0.0 or newer. This validator does not run on earlier versions, but is compatible with newer versions. Java 6 is also a minimum requirement.

Add the Wicket Stuff validator to your POM as a dependency:


Depending on your setup you need to use a different scope (for example test or provided to prevent the validator to be deployed to production).

Add the following lines to your Application's init method:

protected void init() {
    getRequestCycleSettings().addResponseFilter(new HtmlValidationResponseFilter());

You might want to put a check for the configuration of your application around the addition of the response filter, to ensure that the filter doesn't run in production mode:

if (RuntimeConfigurationType.DEVELOPMENT == getConfigurationType()) {
    getRequestCycleSettings().addResponseFilter(new HtmlValidationResponseFilter());


This project is distributed using the Apache 2 License (see LICENSE for more details on other included software).


Building Wicket.Validator is not difficult: you need to have Java 6 and Maven 3 installed, and know how to checkout sources from github. Assuming you know how to use Git, you need to do the following on a command prompt:

$ git clone git://
$ cd wicket-stuff-markup-validator
$ mvn install

Then you can add the Wicket.Validator dependency to your own application using Maven.

Original sources

Most of the sources come from the htmlvalidator service, which has its source code published on bitbucket.

Follow the build instructions found here: to get all the necessary sources (patched and downloaded) onto your system. Just make sure that the checker folder is next to the clone of the wicket validator folder.

The whattf module is derived from the syntax module:

Retrieve the sources:

hg clone

Remove the current sources and copy the newly checked out one's:

rm -rf wicketstuff-htmlvalidator-parent/whattf/src/main/java
cp -r checker/syntax/non-schema/java/src wicketstuff-htmlvalidator-parent/whattf/src/main/java
cp -r checker/syntax/relaxng/datatype/java/src/org wicketstuff-htmlvalidator-parent/whattf/src/main/java
cp -r checker/validator/src/nu/validator/localentities wicketstuff-htmlvalidator-parent/whattf/src/main/resources/nu/validator

rm -rf wicketstuff-htmlvalidator-parent/whattf/src/main/resources/relaxng/*
cp checker/syntax/relaxng/* wicketstuff-htmlvalidator-parent/whattf/src/main/resources/relaxng
Something went wrong with that request. Please try again.