|Date|28-Nov-2004 14:41:59 EET
|Version|JSPWiki v2.1.123-cvs
|Browser version|Firefox
|[PageProvider] used|VersioningFileProvider
|Servlet Container|JBoss-3.2.6 + JBossweb-tomcat50
|Operating System|Windows XP Pro
|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.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.



Fix follows:

WikiEngine:1861: File file = new File( m_rootPath, fileName );

WikiEngine:1861: java.net.URL baseURL = new java.net.URL(m_baseURL);
WikiEngine:1862: File file = new File( m_servletContext.getRealPath(baseURL.getPath()), fileName );