|Title|WikiEngineAccessesRDFFilesInconsistently
|Date|28-Nov-2004 14:41:59 EET
|Version|JSPWiki v2.1.123-cvs
|Submitter|66.80.8.148
|Criticality|MediumBug
|Browser version|Firefox
|Status|NewBug
|[PageProvider] used|VersioningFileProvider
|Servlet Container|JBoss-3.2.6 + JBossweb-tomcat50
|Operating System|Windows XP Pro
|URL|http://www.yourdomainhere.org/somepath/Wiki.jsp?page=Anything
|Java version|j2sdk1.4.2_06

The WikiEngine.RSSThread class creates a file using a different algorithm than that which WikiEngine.getGlobalRSSURL() uses to subsequently return the filename.  

I use

jspwiki.baseURL=http://www.mydomain.net/wiki/
jspwiki.rss.fileName = mydomain.rdf

and then 

*  WikiEngine.RSSThread uses m_rootPath + getProperty("jspwiki.rss.fileName") to generate the file.

*  WikiEngine.getGlobalRSSURL() uses jspwiki.baseURL + getProperty("jspwiki.rss.fileName") to return URLs for the generated file.

So, if my web context is /FOO then the generated file will always be /FOO/mydomain.rdf and the link shall always point to http://www.mydomain.net/wiki/mydomain.rdf.  The file is really at http://www.mydomain.net/mydomain.rdf, but there isn't any way to fix this from the configuration unless you are willing to forgo either the prefix in the baseURL or RSS generation.

The implied assumption of JSPWiki is that jspwiki.baseURL points to your wiki files (i.e. Wiki.jsp).  The implied assumption of getGlobalRSSURL() is that your RSS file is in the same directory as your Wiki.jsp file (i.e. baseURL).

I think that RSSThread should not use m_rootPath.  Instead I think it should use  m_servletContext.getRealPath((new URL(getBaseURL())).getPath()) + getProperty("jspwiki.rss.fileName") so that both the creation and links are relative to base URL.

Cheers,

Mike
mtaylor@no-spam-emeraldcave.net