Tue 4 Jul 2006
And the Tag Libraries keep on rolling in! (RSS Feeds made easy)
Posted by anadeau under Developer Wing , Open Source , Coding Tips & InfoRSS Feeds... making big news these days! Most will know what they are but if not here is a quick explanation of what they consist of:
RSS is a family of web feed formats, specified in XML and used for Web syndication. RSS is used by (among other things) news Web sites, weblogs and podcasting. The abbreviation is variously used to refer to the following standards:
- Really Simple Syndication (RSS 2.0)
- Rich Site Summary (RSS 0.91, RSS 1.0)
- RDF Site Summary (RSS 0.9 and 1.0)
We've been talking a lot lately at our company about RSS Feeds. Our product OfficeGateway has an RSS Reader for users and it's becoming quite popular. Everyday, the first thing I do (as a user of OfficeGateway) is login and read my favorite feeds from many different news sites, blogs, etc. We are always looking for better/easier ways to integrate new technology with our software products and I was able to find another great JSP Tag Library. The name of it is RSS Utilities and it was developed by By Rodrigo Oliveira of Sun. Thanks Rodrigo, you did a great job.
It's basically the same as implementing the Mailer Tag Library that I posted about earlier. 3 simple steps to get rss feeds reading into your applications:
-
<taglib>
-
<taglib-uri>/WEB-INF/rssutils.tld</taglib-uri>
-
<taglib-location>/WEB-INF/rssutils.tld</taglib-location>
-
</taglib>
-
<%@ taglib uri="/WEB-INF/rssutils.tld" prefix="rss" %>
-
<rss:feed
-
url="http://servlet.java.sun.com/syndication/rss_java_highlights-XYZCompany-10.xml"
-
feedId="example1"/>
-
<b>Image: </b><rss:channelImage feedId="example1" asLink="true"/><br>
-
<b>Title: </b><rss:channelTitle feedId="example1"/><br>
-
<b>Link: </b><rss:channelLink feedId="example1" asLink="true"/><br>
-
<b>Description: </b><rss:channelDescription feedId="example1"/><br>
-
<ul>
-
<li><rss:itemTitle feedId="example1" index="0"/><br>
-
<rss:itemDescription feedId="example1" index="0"/><br><br>
-
<li><rss:itemTitle feedId="example1" index="1"/><br>
-
<rss:itemDescription feedId="example1" index="1"/><br>
-
</ul>
After you have the 3 steps completed (and the jar file included in your classpath) that's it! Start reading in Feeds from anywhere. Very easy to integrate with applications. The tag library has a number of useful properties that can be set to customize your feeds.
Here is a link if you would like to view the tutorial from Sun and I've also included a link here to a resource if anyone is interested in investigating RSS Feeds further!
Best of luck with RSS feeds, it's definitely going to be a big part of the future on the Internet!
And oh yeah! If anyone would like to include my blog in their RSS feeds, please feel free. Here is the link http://www.evolvingsolutions.ca/devwing/?feed=rss2
Thanks,
Adrian
PS: Thanks goes out to Amit Gupta for his WordPress plugin for including code within your Posts (as seen above). Anyone interested in looking at his plugin (iG:Syntax Hiliter - seemed to work better than most for me) feel free to visit his blog and download it here.
November 7th, 2006 at 9:05 pm
free advice…
Thank you, I could not have sead it better my self….