XHTML Validation Filter

ValidationFilter is a Java servlet filter that can run on and J2EE servlet container (Tomcat, Jetty, Resin, Web Logic, JBoss etc). It is designed to be used during development and then turned off (or removed) for production.

XHTML is good... when valid, otherwise it's useless. ValidationFilter will validate your XHTML as you develop, showing you errors in a nice source view.

See the manual for more information. You may also find the javadoc or the junit reports useful.

Also a filter for URL rewriting in java.

Download & Installation


validationfilter-0.6.jar (about 500kb)

  1. Download validationfilter-0.6.jar to your WEB-INF/lib directory.
  2. Open your WEB-INF/web.xml file and add (above any servlet definitions you might have):
                    <param-value>localhost,, dev.foobar.com</param-value>
    Note, you can add any mappings (*.html, *.jsp, /loginServlet etc) you want
  3. Restart the context.


validationfilter-0.6-src.zip (about 2mb)
validationfilter-0.6-src.tar.gz (about 2mb)


0.6 (11/2006) - fixed problem with output buffering under Resin
0.5 (7/2009) - Validation now displayed in Hideable div
0.3 (8/2005) - now checks for xhtml dtd to be specified
0.2 (4/2005) - Added support for XHTML Basic 1.0 and XHTML 1.1
0.1 (3/2005) - First version!


ValidationFilter is distributed under the GPL License. For more information on the GPL license see opensource.org/licenses.

Thanks to Adrian Pronk and Cameron Hart for thier help in getting this idea off the ground.

© Copyright 1995-2022 Paul Tuckey