This is version . It is not the current version, and thus it cannot be edited.
[Back to current version]   [Restore this version]

@author Albert T. Wong (atwong@alumni.uci.edu)
@version 1.0 developed for JSPWiki 2.0.52

Code is Apache Software Foundation Licensed

Install#

Note: This plugin is not compatible with JSPWiki v2.4.91 --Dave

How to use this:
Drop this file in the %classpath%/albertwong or if you have the JAR, drop the JAR into the java lib folder.
Add all the jars into the java lib folder. (I'm using the entire Apache Commons package along with Xerces).

Question: shall we add something to jspwiki.properties besides reloading the application? If so, what shall we had?

Syntax#

[{albertwong.RSSRDFReaderPlugin url='http://rss.com.com/2547-12-0-5.xml' detail='1'}]

Arguments:
url = String. url of newfeed
size = Optional. integer. Default 10. size of items to show
hrTop = Optional. integer. Default 0. > 0 means show. Other means no show.
hrBottom = Optional. integer. Default 0. > 0 means show. Other means no show.
table = Optional. integer. Default 0. > 0 means show. Other means no show.
detail = Optional. integer. Default 0. > 0 means show. Other means no show.


Plugin insertion failed: Could not find plugin RSSRDFReaderPluginPlugin insertion failed: Could not find plugin RSSRDFReaderPlugin Plugin insertion failed: Could not find plugin albertwong.RSSRDFReaderPluginPlugin insertion failed: Could not find plugin albertwong.RSSRDFReaderPlugin

Discussion#

This is very cool! Thank you! :-) --JanneJalkanen

Can somebody explain why the feed: 'http://dwlt.net/tapestry/dilbert.rdf' is not working? I get: Error! Unable to understand/read the RSS Newsfeed.

If you're getting an error about Log4J, remove the commons-logging.jar. Somehow jspwiki code and Apache Commons Logging JAR do not like each other (in future, jspwiki code should use Commons Logging for "good design" as all Apache Jakarta projects are now using it). --AlbertWong

The last time I looked, commons-logging.jar created FAR more dependencies and problems than log4j. I don't want to include any extra stuff, if I can avoid it. Most of Jakarta Commons stuff relies too much on other things. I hate it. I would really, really like to use it, but... In fact, I'm thinking if we should mandate JDK 1.4, just because then I could use the built-in logging: at least with that there should be far less confusion about things, even though it's not a nowhere near-optimal solution --JanneJalkanen
Fair comment... but I would say that JDK 1.4 means that it would break this code to all previous version (JDK, app servers, etc etc). The point of Apache Common Logging was being a thin wrapper to the real logging tool. So, the interfaces remain the same while the implementation is different. This solution has been thought over a lot already and that's why Apache is moving in that direction. Of course, I'm not saying go code it that way, I'm saying there is a reason why so many are doing this. As for comments on Apache Commons, it only relies on all the other Common libraries.. that's a matter of opinion. I use the libraries because it's nice to have utilities that I usually want/need. Why learn all these utilities when you can learn a single set that is good and free? --Albert

Someone mention you're gettin errors with a certain feed. The code uses the RSSReader used in Apache Commons. I believe it only support certain versions of RSS/RDF. I think the safe one to use is RSS 0.91. There are others, but I don't know off the top of my head. If it works, great, if not.. oh well. You're more than welcome to contrib to the code base (I would recommend upgrading the one in Apache Commons so that all may benefit and then we'll just have to pull the new JAR from Apache and viola! --AlbertWong

There are multiple RSS formats (0.91, 0.92, 0.93, 1.0, 2.0). It is very confusing. --JanneJalkanen
Yes.. I'm saying that my plugin only supports certain version.. I don't know the full list. As for confusing.... move to ATOM, it's better anyhow and was better designed. --AlbertWong

if you try parsing with jspwiki's own feed , say by inserting:

[{INSERT albertwong.RSSRDFReaderPlugin url=http://www.jspwiki.org/rss.rdf' detail='0'}]]

it doesnt work; not even if you change the feed extension to .xml . Apart from that it is indeed a great plugin.

Maybe you could have a look at Informa, it's a RSS aggregator library which supports all RSS versions. -- Jawe
I just implemented Informa plugin for myself. Works with 0.91, 1.0 and 2.0 RSS. Amazing it can read the JSPWiki RDF feeds in JUnit tests but I get problems running it in Websphere runtime. --AlbertWong

Ahh.. searched on Google. Seems that Websphere 5.0 uses a old jdom.jar in /opt/WebSphere/AppServer/lib. Upgraded it to b9. See http://it.cappuccinonet.com/strutscx/tools/strutscx_websphere.htm for more details. Everyone is now gravy. --AlbertWong
  • Rome is another Java API which provides RSS parsing capabilities. Unlike the more mature Informa it also supports Atom.Today it accepts all flavors of RSS (0.90, 0.91, 0.92, 0.93, 0.94, 1.0 and 2.0) and Atom 0.3 feeds. Their comparison with Informa makes interesting reading - they state that Informa is hard to use! --MannyMoura

Plugin working for me in Websphere 5.0. However, I'm finding the size= parameter doesn't override the number of items returned by feed. All other options appear to work. Any ideas what I should look for? Thanks and regards, Speedy

Further to this, just looked in the code. Appears that this hasn't been implemented? Is that true? I'll make code amendment locally. Be good to have confirmed.. Regards Speedy

Couldn't help myself. I've fixed the code issue (the original loop has been changed to an Iterator, but the size code check had been overlooked!). I've put a quick hack in to fix it and uploaded the individual jar (which includes source and class). Regards Speedy

Add new attachment

Only authorized users are allowed to upload new attachments.

List of attachments

Kind Attachment Name Size Version Date Modified Author Change note
jar
JSPWiki_RSSReaderPlugin.jar 7.0 kB 1 24-May-2006 18:43 80.3.160.13
zip
JSPWiki_RSSReaderPlugin.zip 2,066.6 kB 2 04-Jun-2004 01:53 63.64.178.2
« This particular version was published on 01-Mar-2007 21:57 by 124.205.136.195.