RSS 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:

  • Step 1: Include the following code in your web.xml file.
    XML:
    1. <taglib>
    2.         <taglib-uri>/WEB-INF/rssutils.tld</taglib-uri>
    3.         <taglib-location>/WEB-INF/rssutils.tld</taglib-location>
    4. </taglib>

  • Step 2: Include this single line at the top of your JSP page.
    CODE:
    1. <%@ taglib uri="/WEB-INF/rssutils.tld" prefix="rss" %>

  • Step 3: Include the call on your JSP page where you would like to read in the feed.
    CODE:
    1. <rss:feed
    2. url="http://servlet.java.sun.com/syndication/rss_java_highlights-XYZCompany-10.xml"
    3. feedId="example1"/>
    4. <b>Image: </b><rss:channelImage feedId="example1" asLink="true"/><br>
    5. <b>Title: </b><rss:channelTitle feedId="example1"/><br>
    6. <b>Link: </b><rss:channelLink feedId="example1" asLink="true"/><br>
    7. <b>Description: </b><rss:channelDescription feedId="example1"/><br>
    8. <ul>
    9.   <li><rss:itemTitle feedId="example1" index="0"/><br>
    10.       <rss:itemDescription feedId="example1" index="0"/><br><br>
    11.   <li><rss:itemTitle feedId="example1" index="1"/><br>
    12.       <rss:itemDescription feedId="example1" index="1"/><br>
    13. </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!

    RSS Feed Resource

    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.