[opencms-dev] and yet another import/export question

Christian Steinert christian_steinert at web.de
Tue Aug 8 18:49:52 CEST 2006


Have you checked if the current site root is set as expected?
As you may know, opencms will always add the site root in front of the paths you specify.

try to do something like

String myPath = co.getRequestContext.removeSiteRoot( "/sites/default/" );

String[] resourcesToExport = new String[] { 
  myPath
};


Then it will hopefully work if your site root is set to "/sites/default/", but also with the site root being set to "/".

christian

> 
> hello list,
> 
> just curious: why is it i can't do this (in 6.0):
> 
> String[] resourcesToExport = new String[] { "/sites/default/" };
> 
> CmsExport ce=new CmsExport(
> 	co,
> 	filename,
> 	resourcesToExport,
> 	true,
> 	true
> );
> 
> 
> it gives me an exception saying i tried to access a folder as a file. 
> yes, it's a folder. but if export a file WITHIN that folder, it exports 
> the folder just fine ... why can't i export the folder alone? it's not a 
> big difference, or is it?
> 
> .rm
> 
> _______________________________________________
> 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


__________________________________________________________________________
Erweitern Sie FreeMail zu einem noch leistungsstärkeren E-Mail-Postfach!		
Mehr Infos unter http://freemail.web.de/home/landingpad/?mc=021131




More information about the opencms-dev mailing list