My favorites | Sign in
Project Home Downloads Wiki Issues Source
Project Information

What is it

This project provides the W3cMarkupValidationFilter, which

  • captures the HTML of all rendered pages
  • Sends the HTML to a W3C Markup Validation Service
  • Injects a little box into the HTML page, which becomes green, if the HTML is valid, or otherwise red

The injected box also contains a link to the validation result page, where you can see a detailed description for each error.


1.) Download

2.) If you use Maven, you can install the jar file into your local repository via

    mvn install:install-file -DgroupId=de.michaeltamm \
                             -DartifactId=W3cMarkupValidationFilter \
                             -Dversion=1.0.2 \
                             -Dpackaging=jar \

and then add the following dependency to your pom.xml


If you don't use Maven, add the jar file to your WEB-INF/lib directory as well as the following jar files, which the W3cMarkupValidationFilter depends on:

3.) Add the following snippet to your web.xml



4.) Deploy your web application on to a local servlet container, start it and request any page - the little box should appear in the upper right corner of your browser.

You should also ...

By default, the W3cMarkupValidationFilter uses the publicly available W3C Markup Validation Service under the URL

You might want to install the W3C Markup Validation Service on a server in your intranet and configure the W3cMarkupValidationFilter in your web.xml like this:


When deploying your web application on to a production environment, you can either remove the <filter> and its <filter-mapping> from the web.xml or set the init-parameter enabled to false.

Powered by Google Project Hosting