[opencms-dev] CmsStaticExportManager / looking up VFS resource by rfsName ...

Andy Savin A.D.Savin at bath.ac.uk
Wed Nov 19 10:39:24 CET 2008


We have the same problem and haven't managed to find a perfect solution so 
I would be interested to know your suggestions work.

Regards,

Andy

-- 
----------------------------
   WEB SYSTEMS DEVELOPER
   Web Services
   University of Bath
   Tel: 01225 38 6275
----------------------------

On Wed, 19 Nov 2008, Ruben Malchow wrote:

> From: Ruben Malchow <ruben at khm.de>
> To: The OpenCms mailing list <opencms-dev at opencms.org>
> Date: Wed, 19 Nov 2008 07:11:51 +0100
> Subject: [opencms-dev] CmsStaticExportManager / looking up VFS resource by
>     	rfsName ...
> Reply-To: The OpenCms mailing list <opencms-dev at opencms.org>
> X-Spam-Score: 1.6 (+)
> 
>
>
>
> hi list,
>
> we're having a bit of a problem with a multi-site setup and RFS
> rules. basically, what happens is this:
>
>   /sites/a/index.html
>
> and
>
>   /sites/b/index.html
>
> are being called. now, if both exportnames are set to / (because
> we don't them in any urls) and both files are exported, opencms
> will mix up these resources. when doing the handle404, it will
> only see /index.html. and it will try to determine the
> corresponding vfs resource from this, ignoring host and port.
>
> if there are any rfs rules in place, CmsStaticExportManager.getExportData()
>
> (line 2196), will no longer know the difference between:
>
>   http://localhost:8081/index.html
>
> and
>
>   http://localhost:8080/index.html
>
> i found there might be an easy fix to this. replacing line 907:
>
>        return getExportData(rfsName, null, cms);
>
> with this:
>
>    	String vfsName = null;
>
>    	CmsSite site = OpenCms.getSiteManager().matchRequest(request);
>
>    	if(site!=null) {
>        	vfsName = site.getSiteRoot()+rfsName;
>    	}
>
>        return getExportData(rfsName, vfsName, cms);
>
> should do the trick. this will actually resolve the vfsName
> in a place where the information about the host and port
> are still available.
>
> what do you guys think? is that reasonable? doable?
>
> ruben
>
> _______________________________________________
> This mail is sent to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please visit
> http://lists.opencms.org/mailman/listinfo/opencms-dev
>



More information about the opencms-dev mailing list