JSP 2.0 SEO friendly links encoding

Posted by victor hugo on Stack Overflow See other posts from Stack Overflow or by victor hugo
Published on 2010-05-02T09:08:12Z Indexed on 2010/05/02 9:17 UTC
Read the original article Hit count: 259

Filed under:
|
|
|

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?

© Stack Overflow or respective owner

Related posts about jsp

Related posts about el