You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Brian McGovern <bm...@imediainc.com> on 2005/05/24 20:12:57 UTC

JSTL Rss Reading

Hi, 
I'm having a rough time with the issue of reading in rss feeds in my presentation layer.  My situation calls for the same feed to be shown on every screen of a certain section.  Problem is, it loads very slow.  There are a million ways to approach this and Im hoping to keep my logic on the presenation layer in a tag based fashion.  My last resort is to create a scheduled job that creates a file to be inlcuded every 10 or 20 minutes.  Any ideas appreciated.

<c:import var="rssFeed" url="http://rss.prnewswire.com/"/>
<x:parse var="rss" doc="${rssFeed}" />
<table width="200" cellpadding="5" cellspacing="0" bgcolor="#EEEEEE" class="BorderOn">
	<th height="23" bgcolor="#CCCCCC" align="left">&nbsp;&nbsp;<span class="infoTextHeader">Recent Headlines</span></th>
	<x:forEach begin="0" end="5" select="$rss//*[name()='item']" varStatus="indexCounter">
             <tr>
                <td align=left valign=top><a href="<x:out select="./*[name()='link']"/>" class=small><x:out select="./*[name()='title']" escapeXml="false"/></a></td>
             </tr>
             </x:forEach>
</table>

Thanks
B

Re: JSTL Rss Reading

Posted by Martin Gainty <mg...@hotmail.com>.
Brian
did you look at frank zammetti's xhrstruts (Browser independent RSS feed 
implementation using JavaScript) ?
http://www.omnytex.com/articles/xhrstruts/
Martin-

----- Original Message ----- 
From: "Brian McGovern" <bm...@imediainc.com>
To: "Struts Users Mailing List" <us...@struts.apache.org>
Sent: Tuesday, May 24, 2005 2:12 PM
Subject: JSTL Rss Reading


Hi,
I'm having a rough time with the issue of reading in rss feeds in my 
presentation layer.  My situation calls for the same feed to be shown on 
every screen of a certain section.  Problem is, it loads very slow.  There 
are a million ways to approach this and Im hoping to keep my logic on the 
presenation layer in a tag based fashion.  My last resort is to create a 
scheduled job that creates a file to be inlcuded every 10 or 20 minutes. 
Any ideas appreciated.

<c:import var="rssFeed" url="http://rss.prnewswire.com/"/>
<x:parse var="rss" doc="${rssFeed}" />
<table width="200" cellpadding="5" cellspacing="0" bgcolor="#EEEEEE" 
class="BorderOn">
<th height="23" bgcolor="#CCCCCC" align="left">&nbsp;&nbsp;<span 
class="infoTextHeader">Recent Headlines</span></th>
<x:forEach begin="0" end="5" select="$rss//*[name()='item']" 
varStatus="indexCounter">
             <tr>
                <td align=left valign=top><a href="<x:out 
select="./*[name()='link']"/>" class=small><x:out 
select="./*[name()='title']" escapeXml="false"/></a></td>
             </tr>
             </x:forEach>
</table>

Thanks
B

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org