Google URL shortener taglib ver. 1.2


    Custom JSP tags library lets you deal with Google URL shortener API. The Google URL Shortener at goo.gl is a service that takes long URLs and squeezes them into fewer characters to make a link that is easier to share, tweet, or email to friends.

You can use these JSP custom tags to programmatically interact with goo.gl service right from JSP (and/or Coldfusion pages). For example:
 


<%@ taglib uri="taglib.tld" prefix="g" %>

<g:GoogleShort>http://www.servletsuite.com</g:GoogleShort>

and you will get this: http://goo.gl/0EGEU

Tags are:

GoogleShort

Body tag lets you obtain short url. Tag uses own body as a source (long) url. Attributes are:

1) proxyHost Optional attribute. Describes proxy settings for your host
2) proxyPort Optional attribute. Describes proxy settings for your host
3) key Optional attribute. Describes an API key
4) cond Optional attribute. Describes a boolean value tag's behavior depends on. Default value is true - get short URL
5) id Optional attribute. Describes a name for the page scope (type is java.lang.String) for the calculated data. Without this parameter tag just prints the short url.

GoogleUnShort

Body tag lets you obtain long (source) url. Tag uses own body as a short url. Attributes are:

1) proxyHost Optional attribute. Describes proxy settings for your host
2) proxyPort Optional attribute. Describes proxy settings for your host
3) key Optional attribute. Describes an API key
4) cond Optional attribute. Describes a boolean value tag's behavior depends on. Default value is true - get long URL
5) id Optional attribute. Describes a name for the page scope (type is java.lang.String) for the calculated data. Without this parameter tag just prints the long url.

for downloading:

Library: googleshorttag.jar    Description: taglib.tld

 © Coldbeans      Comments?

See also Coldtags suite - the largest collection of custom JSP tags.

     

Also in Coldtags: