mod-rewrite equivalent for Tomcat

I've migrated and merged my old blogs.sun.com and bleaklow.com blogs into this new one, using Pebble. As a result, there are a number of links out there on the interwebs to bleaklow.com that are now broken, as everything has moved around - google's webmaster tools gives me a comprehensive list. If I was hosting this blog using Apache, the standard solution would be to use the most excellent mod-rewrite Apache module to redirect the broken links to somewhere appropriate. However Pebble is a J2EE application and uses Tomcat instead of Apache. I've been looking for an equivalent to mod-rewrite for a while and never managed to find anything. Whilst looking for something else entirely (always the way) I found Url Rewrite Filter. This is functional equivalent to mod-rewrite for J2EE servers, and offers most of the same features as mod-rewrite. I'm using it and it seems to do the job just fine, and the beta even has a mod-rewrite style configuration option, if you need a security blanket :-)

Categories : Java, Web, Tech