I am developing a simple cms for an online health magazine using JSP,Tomcat and urlrewritefilter for url rewriting. I am migrating content from wordpress and should keep the permalinks on the site. Permalinks looks like below with only letters and numbers.
http://www.example.com/post-or-category-name-with-letters-or-1234/
I want to rewrite my url in my jsp application so that I can have urls like above. Rewrite Rule should work as follows.
http://www.example.com/post/?pid=1234&name=post-name
http://www.example.com/category/?cid=1234&slug=category-slug
into
http://www.example.com/post-name/
http://www.example.com/category-slug/
And of course vice versa.
How can I have a wordpress-like permalink structure using urlrewritefilter? Do I need to write a Servlet for getting the id of name or slug from DB?
Anybody has an idea how to do that or done it before?