RefactorMe

I upgraded JSPWiki from 1.8.2 to 2.0.45. I did as suggested, copying the properties files and my web.xml as indicated.

I want to get RSS to work and have uncomented the proper options on the properties files.

I tried accessing it from the web interface: http://rivendell.no-ip.info:8080/wiki/rss.rdf and get a file not found

Questions are:

  • Is there a way to force the creation/update of the RSS file?
  • How do I add a link from my template to the RSS file?
  • Other than the configuration file do I need to do anything else?
  • is rss.rdf actually writen to disk or is it a generated file?

These three steps are required:

  • Make sure that the WAR file has been expanded, or that you have a directory where the RSS file is generated.
  • Enable the RSS feed by setting "jspwiki.rss.generate = true" in your jspwiki.properties file.
  • Set the "jspwiki.baseURL" -variable in jspwiki.properties to your wiki address.

The "rss.rdf" file is then generated hourly to the directory.


I've managed to get the rss file to generate. Now my browsers are giving me problems, neither IE 6.0 SP1 nor Mozilla 1.4 will display the rss file correctly. I've emailed the maintainer and he has no problems viewing it... are there browser compatibility issues when viewing the RSS file?

It's just XML... I have no idea what "to display correctly" means in this case. Normally, you wouldn't want to view it through a browser anyway; it's machine-digestible information. If you really want to view it on a web browser, check that your web server is serving the correct MIME type for RDF files, or change the jspwiki.rss.fileName to something like "rss.xml" and check that you are serving text/xml. --JanneJalkanen


Note
The properties file says the jspwiki.rss.fileName is relative to the jspwiki dir, but I found I could get the RSS feed to build a file when using a *.war file by giving a full path for the jspwiki.rss.fileName. Since I'm running windows I ended up with jspwiki.rss.fileName=c:\\dir1\\dir2\\jspwikidir\\rss.rdf and that worked. -- Scott Hurlbert

Another Note
On my machine the properties file is in <install directory>/webapps/jspwiki/WEB-INF. I was modifying the one in the etc directory where I originally expanded my install and where my Page Cache is located. OOPS!

Seeking for help:-)

I am using JSPWiki 2.0.52 and I have set the following variables in the jspwiki.properties file as:

jspwiki.rss.generate = true

jspwiki.rss.fileName = rss.rdf

jspwiki.rss.interval = 3600

jspwiki.rss.channelDescription = bla...bla...

jspwiki.rss.channelLanguage = zh-cn

jspwiki.baseURL = http://162.105.72.21:8080/JSPWiki/

'http://162.105.72.21:8080/JSPWiki/' is the url to visit my wiki. But I could not get the file rss.rdf generated. What should I do next?

--LiuXiaoGang

Ooops, finally I know what has happened. There's a blank character which can not be seen after the 'jspwiki.rss.generate = true'.

--LiuXiaoGang


com.ecyrd.jspwiki.rss.RSSGenerator, line 189 (CVS rev. 1.16) looks like this:
SimpleDateFormat iso8601fmt = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'");
Q: Why is there a 'Z' in the format, which resolves to a literal Z? Shouldn't this be a Z (without the quotes) which resolves to (f.e.) +200 (= timezone offset). A feedreader app I wrote using Rome, chokes on this - it parses the time part to 00:00:00.

--Jawe

No. Your parser is wrong.

The spec says very clearly:

This profile defines two ways of handling time zone offsets:
  1. Times are expressed in UTC (Coordinated Universal Time), with a special UTC designator ("Z").
  2. Times are expressed in local time, together with a time zone offset in hours and minutes. A time zone offset of "+hh:mm" indicates that the date/time uses a local time zone which is "hh" hours and "mm" minutes ahead of UTC. A time zone offset of "-hh:mm" indicates that the date/time uses a local time zone which is "hh" hours and "mm" minutes behind UTC.

--JanneJalkanen

Thanks. I'll forward this to the Rome people...
Delete this section if you like. --Jawe
Later: Ok, this seems to be fixed in Rome's CVS.


Is generation of the RSS feed known to work with JSPWiki deployed as a war file to JBoss?

I can't get it to work with JBoss 4.0.0.

<wiki:RSSImageLink title="Aggregate the RSS feed" />

Returns nothing with the properties set like this in jspwiki.properties:

jspwiki.rss.generate = true
jspwiki.rss.fileName = rss.rdf
jspwiki.rss.interval = 3600
jspwiki.rss.channelDescription = Hmmmm
jspwiki.rss.channelLanguage = en-us

I suspect it might be because JBoss is not allowing a file (rss.rdf) to be created, if that is what JSPWiki is trying to do. If so, why? Why not output the RSS feed from a JSP like all the other pages?

Thanks for answers, -- Greg.


If you deploy JSPWiki as a WAR file, you can't have RSS generation. This is a problem with the Servlet API, and I haven't figured out how to go around it without specifically requesting the path from the user. (And I did not know this beforehand before people started deploying JSPWiki as a WAR-file.)

We actually do have a JSP page that generates RSS, but that's only for the WeblogPlugin :-/. The whole RSS thing is a bit of a mess right now. Point being, you have to open the WAR-file, then RSS generation works.

(The reason why it's not dynamic is that RSS feeds get requested A LOT. Now that we have built-in caching, it might make sense to do it otherwise...)


I enabled RSS as suggested above and JSPWiki did generate rss.rdf. However, when I looked at the page history and clicked the xml image there, i always got a file download message window and the file name is always rss.jsp instead of rss.rdf (or another file name?). Can somebody enlighten me?

Thanks.

-- JanneJalkanen


I am able to get the rss.rdf file generated in my webroot. But when I add the feed in my mozila news and blog section to pick up the feed(where i normally have all my other feeds), it give me a message "Not a valid feed". To verify I added the feed from jspwiki website and that works. Any idea, what do I need to do to get this working. -Subu.

Try http://feedvalidator.org/ -- Jawe

The file that my wiki produces is actually an rdf (<rdf:RDF>) not like the jspwiki.org site an rss (<rss version="2.0">). I have no idea how to change that though. My guess is, its the problem that most people will have to make the rss feeds work. -- Joerg


JSPWiki generates RSS 1.0 feeds (RDF) for the global changes, and RSS 2.0 for the page changes. The user does not have to do anything (except set the baseURL).

/Janne

My wiki: random page -> page info -> click xml picture -> <rdf:RDF>
jspwiki.org: random page -> page info -> click xml picture -> <rss version="2.0">
i tried it with left menu and system pages like Project Tattooine, same result. Maybe because im using RCSFileProvider? i cannot see any other difference. Maybe Version? I run 2.2.20 -- Joerg


Ahhh... That's because JSPWiki 2.3 uses RSS 2.0 by default. 2.2 defaults to 1.0. 99% of users should not really care, though. All aggregators worth their name should be able to digest all versions.

-- JanneJalkanen


Hi. I'm using JSPWiki 1.4.82 and the global rss feed does not really reflect the comment added to the page (Let me explain :) )

The current rss feed have one item per page, with only the last change for each page. Is there a method to have one item per modification ?

Thanks for any answer.

--Max_well, 16-Dec-2006

Nope.

-- JanneJalkanen, 17-Dec-2006

What would it take to get this added? The current behaviour is not really very useful for us, as it means that some (many?) readers won't mark a page as unread again once it has been seen the first time. Also the creator in the RDF seems to be the creator of the page rather than the creator of the change which means that it is impossible to reliably filter out ones own changes. We are using JSPWiki 2.8.3.

-- Seb, 13-Jul-2010


If i open my rss.rdf in FireFox i get:

XML-Verarbeitungsfehler: nicht wohlgeformt (english: not-wellformed)
Adresse: http://*/TestWiki/rss.rdf
Zeile Nr. 92, Spalte 12:</rdf:RDF>1</wiki:diff><dc:date>2007-03-16T09:12:33Z</dc:date><dc:creator>xUser</dc:creator><wiki:history>http://*/TestWiki/PageInfo.jsp?page=Kategorie14</wiki:history></item>
-----

Knows anyone why?

AnswerMe Please :)

--MartinU, 27-Mar-2007


No Ideas to solve my Problem?

--MartinU, 04-Apr-2007


I would recommend checking the particular file against one of the publically available RSS checkers. (e.g feedvalidator.org). If that passes, then Firefox has a bug...

--JanneJalkanen, 04-Apr-2007


I am trying to get the rss feed from my wiki to display in one of the google browser homepage widgets, however I get Error: RSS file not found.... displayed in the widget. If I link the widget to http://www.jspwiki.org/rss.rdf it works fine. I can put the URL of the rss file of my Wiki (http://pc191849:9080/ITNSSWiki/rss.rdf) in a browser and it loads fine. In FireFox I can bookmark the rss fead and it loads and updates fine. The settings in my wiki properties file are:

jspwiki.baseURL=http://PC191849:9080/ITNSSWiki/ jspwiki.rss.generate=true jspwiki.rss.fileName=rss.rdf jspwiki.rss.interval=1800 jspwiki.rss.channelLanguage=en-uk

I have tried various different google widgets with no success. I am using v2.4.100. If any one has any useful ideas please AnswerMe.

--skibuddy, 18-Apr-2007


The rss feed includes changes from protected pages. How do I prevent these changes from showing, thanks AnswerMe. Normally, to view the page I have to log in. Using JSPWiki 2.4.53 & JSPWiki 2.4.102

--rdmiller, 23-Aug-2007


You can't. The only way to do that is to turn RSS completely off. This is followed as Bug 121.

The "rss.jsp" does however work properly.

--JanneJalkanen, 24-Aug-2007

This is fixed in latest CVS, BTW.


If I subscribe to the RSS feed for a page using Mozilla Thunderbird I keep getting additional copies of each version of the page. I don't know if this is a JSPWiki problem or a Thunderbird problem, but I am subscribed to a dozen other feeds from various places with Thunderbird and don't have this problem with any of them. An example feed is: http://automatedgenealogy.com/wiki/rss.jsp?page=ProjectOverview&mode=wiki

I have subscribed to this page to see if the same behavior occurs.

Lindsay Patten, 23-Sep-2007

That could also be an inherent problem of the RSS spec, which does not do much to prevent the same update appearing many times. If you can give some more info, that would be great!

-- JanneJalkanen


I looked at this a little closer and I think my issue may be related to the lack of a <guid> element in my feed:

From http://www.feederreader.com/TechnicalGuides/RSS_Basic.html

start quote

<guid>

http://blogs.law.harvard.edu/tech/rss#ltguidgtSubelementOfLtitemgt

This “Global Unique Identifier” allows you to republish or update specific items without duplicating these items in an aggregator. If you change an item without using the <guid> element, then the aggregator has no way of determining that the new item is replacing an old item. In that case, the aggregator will retain the old item and the new item, forcing the user to read it twice. If the <guid> element exists (and is the same as a previous item’s <guid>) then the aggregator can (at the users option) replace the old item with the new one. If the user has not read the item yet, then all they will see is the updated item. If they have read the old item already, then they can optionally read the update or ignore it.

end quote

I should note however that I haven't been getting duplicate copies on my feed of this page, so maybe I did something wrong in the configuration of my jspwiki?

-Lindsay


I looked at this further and it seems to me that one should be able to simply add a guid element that has the same text value as the link element in RSS20Feed.getString() but I'm afraid that I don't have the skills/setup to test this out. It seems like the link address/URL, which includes the version number makes a reasonable globally unique id. I tried to expand the JSPWiki jar file into the classes directory so I could modify it but that caused the wiki to require login to get to the main page so I undid that. Then I tried to build a second webapp to experiment with without affecting my users, but that too ended up with the left menu from my other wiki and a demand to login rather than the usual post-install questions. Presumably it is defaulting to use the same directory for the pages but my attempts at setting a different directories for all the things I could find in jspwiki.properties didn't seem to have any effect on this.

If you submit the feeds to http://feedvalidator.org/ it says that you should add a guid element too, so that is some reinforcement that I might be on the right track. ( feedvalidator.org doesn't like the quote marks somone put in my earlier post either. )

Anyway, if someone can explain how to make changes to code in JSPWiki.jar without messing up my wiki I would appreciate it. Or perhaps someone who knows what they are doing can test if my suggested change works?

Another thought that I hope isn't totally naive or downright stupid, but I sort of expected that an rss feed just being a chunk of xml that the jsp page that generated it would look a little more like a rss page with the elements being filled in, rather than the whole rss page being generated as a single string in buried code. I guess I had been hoping that I could have made a change like I want to here (add a guid element) by simply modifying the jsp file. I don't know this code well enough to know the advantages of taking the current approach.

-- LindsayPatten 05-Oct-2007

Add new attachment

Only authorized users are allowed to upload new attachments.
« This page (revision-74) was last changed on 13-Sep-2010 13:08 by Michael e Whyte