[opencms-dev] Path issue

Alexander Kandzior alex at opencms.org
Mon Feb 21 18:23:50 CET 2005


Try to modify line 3 as follows:
 
3)    String filePath = cms.getSitePath(listResources.getRootPath());

Best Regards
Alex.

Alexander Kandzior
Alkacon Software - The OpenCms Experts
http://www.alkacon.com <http://www.alkacon.com/> 



 


  _____  

From: opencms-dev-bounces at opencms.org
[mailto:opencms-dev-bounces at opencms.org] On Behalf Of rvc_one at mizar.com.br
Sent: Monday, February 21, 2005 6:21 PM
To: opencms-dev at opencms.org
Subject: [opencms-dev] Path issue


Hi all,
 
I'm trying to open a xml resource to read its content and there is a problem
I cant understand:
 
0) List listResources = collector.getResults(cmsObject, "allInFolder",
"/folder/resources/temp_${number}.xml|33");

1) for (int i = 0; i < listResources.size(); i++) {
2)    CmsResource aNews = (CmsResource)listResources.get(i);
3)    String filePath = listResources.getRootPath();
4)    CmsFile sourceFile = cmsObject.readFile(filePath);
 
The line 3 returns the path
"/sites/default/resource/folder/resources/temp_001.xml" and the line 4 try
to read the file at path
"/sites/default/sites/default/resource/folder/resources/temp_001.xml" where
the exception occurs.
 
Someone could explain how could I solve this problem???
 
Thank in advance,
 
Rommel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20050221/395341b1/attachment.htm>


More information about the opencms-dev mailing list