JSP 2.0 SEO friendly links encoding
- by victor hugo
Currently I have something like this in my JSP
<c:url value="/teams/${contact.id}/${contact.name}" />
The important part of my URL is the ID, I just put the name on it for SEO purposes (just like stackoverflow.com does).
I was just wondering if there is a quick and clean way to encode the name (change spaces per +, latin chars removal, etc). I'd like it to be like this:
<c:url value="/teams/${contact.id}/${supercool(contact.name)}" />
Is there a function like that out there or should I make my own?