This looks promising: http://tuckey.org/urlrewrite/manual/3.0/guide.html
From the documentation:
Clean a URL
<rule>
<from>^/products/([0-9]+)$</from>
<to>/products/index.jsp?product_id=$1</to>
</rule>
e.g. /products/1234 will be passed on to /products/index.jsp?product_id=1234 without the user noticing.