[opencms-dev] Path issue
rvc_one at mizar.com.br
rvc_one at mizar.com.br
Mon Feb 21 20:10:24 CET 2005
Alex,
it worked with the following line, but through the getSitePath method.
String filePath = cmsObject.getSitePath(aNews); // aNews of type
cmsResource
Thank you,
Rommel
_____
De: opencms-dev-bounces at opencms.org [mailto:opencms-dev-bounces at opencms.org]
Em nome de Alexander Kandzior
Enviada em: segunda-feira, 21 de fevereiro de 2005 14:24
Para: 'The OpenCms mailing list'
Assunto: RE: [opencms-dev] Path issue
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/25e56be5/attachment.htm>
More information about the opencms-dev
mailing list