http://www.developer.com/tech/article.php/3524171/Working-with-RSS-and-Oracle-JDeveloper-1013.htm
A "How To" article on working with RSS and JSP with Oracle JDeveloper 10.1.3 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: http://java.sun.com/developer/technicalArticles/javaserverpages/rss_utilities/ In this tutorial is a link where you can download a JSP RSS Utility Tag library: http://java.sun.com/developer/technicalArticles/javaserverpages/rss_utilities/rss_utils_1.1.zip 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. 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. 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. Now, it's time to build a simple JSP Web application where you can test the new RSS tags that you've added to JDeveloper. Now, click on the Advanced Properties tab in the same dialog. You'll see Proxy settings and a URL field. This is where you will insert a Web address pointing to a RSS page. Add the following address to the URL field: http://www.oracle.com/technology/syndication/rss_otn_news.xml In general, you can find many RSS-enabled pages on the Web, such as CNN, OTN.Oracle.com, and Developer.com. To see the live RSS feed in its native XML format, simply view the link in a browser such as Mozilla's Firefox or Internet Explorer. http://www.oracle.com/technology/syndication/rss_otn_news.xml This will help you get a better feel for the data that you'll be parsing with JSP tags. Getting back to the application. After you assign the OTN RSS News URL to the URL attribute of the Feed tag dialog, click OK. This will insert an RSS feed tag onto your page. Your source for your feed tag should look like this: Next, you can add some code to your JSP to display some data extracted from the live feed. Save and run the page by right-clicking on your JSP in JDeveloper's file navigator and select Run. Your JSP will have OTN's news items on the page. Cool, huh!? These next steps show how to build a JSP page that will pull content from multiple RSS news feeds by using JSP Segments. After naming and generating empty JSP Segment files, copy and paste the respective code samples into the empty segment files. This code will pull the content from the different feeds. Also, notice that no taglib directives are needed for these pages; they are just segments. developer.jspf—For Developer.com and the JSP segment for OTN: otn.jspf—For OTN Here is the final code of a JSP page that shows both OTN and Developer.com's News Feeds: double.jsp This article hopefully helped open the world of RSS to you by showing how easy it is to experiment with RSS using common J2EE technologies such as JSP and JSP tag libraries in a productive development environment such as JDeveloper. Good luck and have fun building your own custom RSS news fed pages using the JSP tag libraries highlighted here! Chris Schalk is a Principal Product Manager and Java Evangelist for Oracle's application server and development tools division. Chris' primary expertise is Web application development and he is responsible for defining the Web development experience for Oracle JDeveloper. Chris has written numerous samples and articles for various publications, including Javapro and Oracle Magazine and is currently co-authoring JavaServer FacesThe Complete Reference through McGraw-Hill-Osborne. Chris also maintains a popular Blog on J2EE Web development at http://www.jroller.com/page/cschalk.
Working with RSS and Oracle JDeveloper 10.1.3
August 1, 2005
Introduction
Getting StartedRSS and JSP
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.


Building a Simple JSP RSS App



Note: You won't need to set the proxy in JDeveloper if they're already set in the JDeveloper "Web Browser and Proxy" setting in the preferences. However, if you deploy this to another J2EE server, you'll either need to run the server with the Proxy Server setting or just user these tag attributes for proxy settings.
<rss:feed feedId="otn_news"
url="http://www.oracle.com/technology/syndication/
rss_otn_news.xml"/>
<p><rss:channelTitle feedId="otn_news"/></p>
Important: Make sure to paste the code to the source of the JSP instead of the JSP designer. Click on the "Source" tab at the bottom of the JSP visual editor to edit the source.
<p><rss:channelTitle feedId="otn_news"/></p>
<p><rss:channelImage feedId="otn_news" asLink="true"/></p>
<p><rss:channelLink feedId="otn_news" asLink="true"/></p>
<hr/>
<rss:forEachItem feedId="otn_news">
<li>
<a href="<rss:itemLink feedId="otn_news"/>" >
<rss:itemTitle feedId="otn_news"/>
</a>
<br/>
<rss:itemDescription feedId="otn_news"/>
</li>
</rss:forEachItem>
Using JSP Segments to Show Multiple RSS Feeds
Important: Again, make sure to paste the code below into the source of the JSP Segment; otherwise, it will be translated to HTML markup.
<p><rss:channelTitle feedId="developer_news"/></p>
<p><rss:channelImage feedId="developer_news" asLink="true"/></p>
<p><rss:channelLink feedId="developer_news" asLink="true"/></p>
<hr/>
<rss:forEachItem feedId="developer_news">
<li>
<a href="<rss:itemLink feedId="developer_news"/>" >
<rss:itemTitle feedId="developer_news"/>
</a>
<br/>
<rss:itemDescription feedId="developer_news"/>
</li>
</rss:forEachItem>
<p><rss:channelTitle feedId="otn_news"/></p>
<p><rss:channelImage feedId="otn_news" asLink="true"/></p>
<p><rss:channelLink feedId="otn_news" asLink="true"/></p>
<hr/>
<rss:forEachItem feedId="otn_news">
<li>
<a href="<rss:itemLink feedId="otn_news"/>" >
<rss:itemTitle feedId="otn_news"/>
</a>
<br/>
<rss:itemDescription feedId="otn_news"/>
</li>
</rss:forEachItem>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<%@ page contentType="text/html;charset=windows-1252"%>
<%@ taglib uri="http://sun.com/cnpi/rsstag" prefix="rss"%>
<html>
<head>
<meta http-equiv="Content-Type"
content="text/html;
charset=windows-1252"></meta>
<title>
double
</title>
<link href="css/jdeveloper.css"
rel="stylesheet"
media="screen"></link>
</head>
<body>
<h2>
Fun with RSS
</h2>
<rss:feed feedId="otn_news"
url="http://www.oracle.com/technology/
syndication/rss_otn_news.xml"/>
<rss:feed feedId="developer_news"
url="http://developer.com/icom_includes/
feeds/special/dev-5.xml"/>
<table cellspacing="2"
cellpadding="3"
border="1"
width="100%">
<tr>
<th>
Oracle Technology Network
</th>
<th>
Developer.com
</th>
</tr>
<tr>
<td>
<%@ include file="/otn.jspf"%>
</td>
<td>
<%@ include file="/developer.jspf"%>
</td>
</tr>
</table>
</body>
</html>

Click here for a larger image.
Note: You may not be able to view the RSS feed for my blog in your browser because it does not have a ".xml" extension, but the JSP feed tags should work regardless.
Summary
About the Author
