I'm working on a small thing that enables us to check during development whether our markup is w3c compliant. I've used tuckey.org's validator (GPL unfortunately) and implemented an IResponseFilter that renders the validator markup in the response document when there's a spec violation.
I've committed the code to github: http://github.com/dashorst/wicket-stuff-markup-validator so anyone (with access to git) can take a look at it. Using an IResponseFilter has the benefit that we still have Wicket at our disposal, and that we're able to remove the filter when running in deployment mode, without having to modify the web.xml (Validator uses a servlet filter, but didn't work well with our CSS). The thing I run into is that the IResponseFilter is called too late: it is impossible to restart the response at an error page. The response hasn't been committed yet, since I'm able to write into the <head> section and the <body> section. I was thinking about the debug console for 1.5, and figured implementing it as a response filter, that renders the debug console at the bottom of each page (as opposed to having to add the console to each page) when the console is enabled. But the late placement of the filter precludes having the best solution for creating console plugins: wicket components. Since the filter is used outside the rendering cycle, we can't use components (or we'd have to setup a new rendering cycle just for that). Is there a way to move the filter up the request cycle so we can insert component markup (and header contributions) into the stream just before it is sent out to the client? Martijn
