• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to save data returned from a Tag Library  RSS feed

 
Dave Bosky
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm using a Tag Library to get RSS feeds which is working just fine.
My question is how can save put the returned information into a variable to save into a database? I assume it returns a collection and loops through the contents.

Here is my code I'm currently using:
---------
<%@ page contentType = "text/html; charset=iso-8859-1" %>
<%@ page language = "java" %>
<%@ page import = "java.sql.*,java.util.*" %>
<%@ taglib uri = "/WEB-INF/tlds/rssutils.tld" prefix="RSS" %>
<RSS:feed url="http://rss.news.yahoo.com/rss/topstories"
feedId="worldNews"/>
<ul>
<RSS:forEachItem feedId="worldNews" startIndex="1" endIndex="8">
<li><RSS:itemTitle feedId="worldNews"/></li><br>
</RSS:forEachItem>
</ul>
---------

It appears to return a collection called worldNews. How can I access that collection without using the tag syntax like '<RSS:forEachItem'? Is this possible?

Thanks,
Dave
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65833
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Without knowing any details of the tag implementations it's impossible to say for sure. Do you have the source code for the tag handlers?

Usually tag sets like this are geared towards display of data, but not processing of data (since that's the sort of thing you shouldn't be doing in a JSP in the first place).

If the package is well-written and the authors intended such, there may be a Java API (that the tag handlers themselves use) exported for use in Servlets to perform just such tasks as you are asking about.
[ September 02, 2004: Message edited by: Bear Bibeault ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!