Working with RSS and Oracle JDeveloper 10.1.3
A "How To" article on working with RSS and JSP with Oracle JDeveloper 10.1.3
- Getting Startedand JSP
- Building a Simple JSP RSS App
- Using JSP Segments to Show Multiple RSS Feeds
You may or may not have noticed that many Web sites today are starting to offer RSS feeds. What are RSS feeds?
RSS, which stands for Really Simple Syndicate, is basically an XML format for content on the Web that purely represents the content of an Web page without any extraneous presentation or "look and feel" and can thus be syndicated and represented in multiple sites. This contrasts with a traditional Web page that comes with its own formatting and appearance. This article explains how to work with RSS with Java and JSPs along with using Oracle's latest Java development tool, JDeveloper 10.1.3.
When I was getting familiar with RSS and how to use it in JSP, I found a very helpful tutorial by Rodrigo Oliveira at Sun that showed a simple RSS enabled JSP taglib:
In this tutorial is a link where you can download a JSP RSS Utility Tag library:
The next set of steps shows how to add this JSP tag library into JDeveloper and then use it to build a simple RSS-enabled JSP application. After downloading the JSP tag library (rss_utils_1.1.zip) and unzipping it on your filesystem, you will add the JSP tag library to your JDeveloper 10.1.3 Preview environment.
Important: It should be noted that basically the same steps can be performed on JDeveloper version 10.1.2, but this article shows how to do it with the current 10.1.3 Preview version of JDeveloper that can be downloaded for free from JDeveloper's home page at Oracle Technology Network.
After downloading and installing JDeveloper (if you haven't done so already), you can proceed to add the JSP tag library to JDeveloper's tag library repository. Adding a JSP tag library to JDeveloper is simply a matter of adding the jar file, which contains the tag handler Java classes, as a "User java Library" and then adding the Tag Library Descriptor (TLD) as a "JSP Tag Library" to JDeveloper. Sometimes, the TLD and tag handlers classes are embedded in a single jar or sometimes they are separate. In this case, the RSS tag library keeps these separate, so these next steps will show how to register both a basic "Java Library" (based on the RSS jar file) as well as a "JSP Tag Library" (based on the RSS TLD) into JDeveloper.
- To start, open JDeveloper 10.1.3 and click Tools->Manage Libraries:
- Next, click on the "User" node on the and click "New."
- Name the library RSS and add a Classpath entry that points to the location of your rssutils.jar that was provided in the downloaded zip file.
- Next, you'll want to click on the "JSP Tag Libraries" tab in the Manage Libraries dialog.
- In the JSP Tag Libraries panel, click on the "User" node and and click New. This is when you will browse for the location of the RSS taglib's TLD file:
Once you've defined the location of the TLD, click OK and you'll see most of the details for the Taglib filled in. You'll want to change the default prefix to "rss" just to make it easier to work with later on. Also, change the display name to "Rss Tag Library". This is the title that will appear on the Component Palette for these tags.
The next step is to associate the jar file or RSS library with this TLD. Click on the "Browse" button for the Libraries.
- And in the next dialog, shuttle over the RSS library that you added earlier. Then, click OK.
- Before clicking OK on the parent Manage Libraries dialog, make sure that the checkbox is checked for "Show Tag Libraries in Palette." You'll need these on the palette when you build a JSP application with these tags later. Click OK to dismiss the dialog.