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.
Also a filter for URL rewriting in java.
validationfilter-0.6.jar (about 500kb)
<filter> <filter-name>ValidationFilter</filter-name> <filter-class>org.tuckey.web.filters.validation.ValidationFilter</filter-class> <init-param> <param-name>enableOnHosts</param-name> <param-value>localhost, 127.0.0.1, dev.foobar.com</param-value> </init-param> </filter> <filter-mapping> <filter-name>ValidationFilter</filter-name> <url-pattern>*.do</url-pattern> </filter-mapping>Note, you can add any mappings (*.html, *.jsp, /loginServlet etc) you want
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 2005 Paul Tuckey