I’ve just checked into contrib (Sakai’s repo of additional cool stuff) a new service for Sakai called TinyUrlService. Given any URL in Sakai you can get a tiny URL for it to send out in emails or just have as a nice link to a page or tool.
String tinyUrl = tinyUrlService. generateTinyUrl(someUrl);
This returns a URL like:
which when followed will redirect to the original URL just as you’d expect. It takes care of all the necessary checks, for instance if that particular URL already has a tiny URL associated with it, that one is returned instead of making a new one.
You can get it here: