<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:st1="urn:schemas-microsoft-com:office:smarttags" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=windows-1250">


<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]--><o:SmartTagType
 namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="PersonName"
 downloadurl="http://www.microsoft.com"/>
<!--[if !mso]>
<style>
st1\:*{behavior:url(#default#ieooui) }
</style>
<![endif]-->
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline;}
p
        {mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman";}
p.sub, li.sub, div.sub
        {mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman";}
span.EmailStyle19
        {mso-style-type:personal;
        font-family:Arial;
        color:windowtext;}
span.EmailStyle20
        {mso-style-type:personal;
        font-family:Arial;
        color:purple;
        font-weight:normal;
        font-style:normal;
        text-decoration:none none;}
span.EmailStyle21
        {mso-style-type:personal-reply;
        font-family:Arial;
        color:purple;
        font-weight:normal;
        font-style:normal;
        text-decoration:none none;}
@page Section1
        {size:612.0pt 792.0pt;
        margin:72.0pt 90.0pt 72.0pt 90.0pt;}
div.Section1
        {page:Section1;}
-->
</style>

</head>

<body lang=EN-US link=blue vlink=purple>

<div class=Section1>

<p class=MsoNormal><font size=2 color=purple face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:purple'>Found it – it must be CmsObject.getSitePath(CmsResource
res)?<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=purple face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:purple'><o:p> </o:p></span></font></p>

<p class=MsoNormal><font size=2 color=purple face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:purple'>Olli<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=purple face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:purple'><o:p> </o:p></span></font></p>

<div>

<div class=MsoNormal align=center style='margin-left:36.0pt;text-align:center'><font
size=3 face="Times New Roman"><span style='font-size:12.0pt'>

<hr size=2 width="100%" align=center tabindex=-1>

</span></font></div>

<p class=MsoNormal style='margin-left:36.0pt'><b><font size=2 face=Tahoma><span
style='font-size:10.0pt;font-family:Tahoma;font-weight:bold'>From:</span></font></b><font
size=2 face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'> Olli Aro
[mailto:<st1:PersonName w:st="on">olli_aro@yahoo.co.uk</st1:PersonName>] <br>
<b><span style='font-weight:bold'>Sent:</span></b> 16 February 2005 15:00<br>
<b><span style='font-weight:bold'>To:</span></b> 'Alexander Kandzior'<br>
<b><span style='font-weight:bold'>Subject:</span></b> RE: [opencms-dev]
CmsObject.existsResource(String resource) - Version 6</span></font><o:p></o:p></p>

</div>

<p class=MsoNormal style='margin-left:36.0pt'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'><o:p> </o:p></span></font></p>

<p class=MsoNormal style='margin-left:36.0pt'><font size=2 color=purple
face=Arial><span style='font-size:10.0pt;font-family:Arial;color:purple'>Ok –
what is the recommended way to get full site path for a resource? I cannot find
method from the API (it is probably there but I keep missing it </span></font><font
size=2 color=purple face=Wingdings><span style='font-size:10.0pt;font-family:
Wingdings;color:purple'>L</span></font><font size=2 color=purple face=Arial><span
style='font-size:10.0pt;font-family:Arial;color:purple'>)…<o:p></o:p></span></font></p>

<p class=MsoNormal style='margin-left:36.0pt'><font size=2 color=purple
face=Arial><span style='font-size:10.0pt;font-family:Arial;color:purple'><o:p> </o:p></span></font></p>

<p class=MsoNormal style='margin-left:36.0pt'><font size=2 color=purple
face=Arial><span style='font-size:10.0pt;font-family:Arial;color:purple'>Thanks,<o:p></o:p></span></font></p>

<p class=MsoNormal style='margin-left:36.0pt'><font size=2 color=purple
face=Arial><span style='font-size:10.0pt;font-family:Arial;color:purple'><o:p> </o:p></span></font></p>

<p class=MsoNormal style='margin-left:36.0pt'><font size=2 color=purple
face=Arial><span style='font-size:10.0pt;font-family:Arial;color:purple'>Olli<o:p></o:p></span></font></p>

<p class=MsoNormal style='margin-left:36.0pt'><font size=2 color=purple
face=Arial><span style='font-size:10.0pt;font-family:Arial;color:purple'><o:p> </o:p></span></font></p>

<div>

<div style='margin-left:36.0pt'>

<div class=MsoNormal align=center style='margin-left:36.0pt;text-align:center'><font
size=3 face="Times New Roman"><span style='font-size:12.0pt'>

<hr size=2 width="100%" align=center tabindex=-1>

</span></font></div>

</div>

<p class=MsoNormal style='margin-left:72.0pt'><b><font size=2 face=Tahoma><span
style='font-size:10.0pt;font-family:Tahoma;font-weight:bold'>From:</span></font></b><font
size=2 face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'> Alexander
Kandzior [mailto:alex@opencms.org] <br>
<b><span style='font-weight:bold'>Sent:</span></b> 16 February 2005 14:53<br>
<b><span style='font-weight:bold'>To:</span></b> <st1:PersonName w:st="on">olli_aro@yahoo.co.uk</st1:PersonName>;
<st1:PersonName w:st="on">'The OpenCms mailing list'</st1:PersonName><br>
<b><span style='font-weight:bold'>Subject:</span></b> RE: [opencms-dev]
CmsObject.existsResource(String resource) - Version 6</span></font><o:p></o:p></p>

</div>

<p class=MsoNormal style='margin-left:72.0pt'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'><o:p> </o:p></span></font></p>

<p class=MsoNormal style='margin-left:72.0pt'><font size=2 color=blue
face=Arial><span style='font-size:10.0pt;font-family:Arial;color:blue'>It works
as expected. The main reason is that all method that deal with resources in the
VFS are using the site path. not the root path.</span></font><o:p></o:p></p>

<div>

<p class=MsoNormal style='margin-left:72.0pt'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'> <o:p></o:p></span></font></p>

</div>

<div>

<p class=MsoNormal style='mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:
12.0pt;margin-left:72.0pt'><font size=2 face="Times New Roman"><span
style='font-size:10.0pt'>Best Regards,<br>
Alex.<br>
<br>
Alexander Kandzior<br>
Alkacon Software - The OpenCms Experts<br>
<a href="http://www.alkacon.com/">http://www.alkacon.com</a><o:p></o:p></span></font></p>

</div>

<div>

<p class=MsoNormal style='margin-left:72.0pt'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'> <o:p></o:p></span></font></p>

</div>

<blockquote style='border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt;
margin-left:3.75pt;margin-top:5.0pt;margin-right:0cm;margin-bottom:5.0pt'>

<p class=MsoNormal style='margin-left:72.0pt'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'><o:p> </o:p></span></font></p>

<div style='margin-left:36.0pt'>

<div class=MsoNormal align=center style='margin-left:36.0pt;text-align:center'><font
size=3 face="Times New Roman"><span lang=DE style='font-size:12.0pt'>

<hr size=2 width="100%" align=center tabIndex=-1>

</span></font></div>

</div>

<p class=MsoNormal style='mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:
12.0pt;margin-left:72.0pt'><b><font size=2 face=Tahoma><span lang=DE
style='font-size:10.0pt;font-family:Tahoma;font-weight:bold'>From:</span></font></b><font
size=2 face=Tahoma><span lang=DE style='font-size:10.0pt;font-family:Tahoma'>
opencms-dev-bounces@opencms.org [mailto:opencms-dev-bounces@opencms.org] <b><span
style='font-weight:bold'>On Behalf Of </span></b>Olli Aro<br>
<b><span style='font-weight:bold'>Sent:</span></b> Wednesday, February 16, 2005
3:34 PM<br>
<b><span style='font-weight:bold'>To:</span></b> <st1:PersonName w:st="on">'The
 OpenCms mailing list'</st1:PersonName><br>
<b><span style='font-weight:bold'>Subject:</span></b> [opencms-dev]
CmsObject.existsResource(String resource) - Version 6</span></font><span
lang=DE><o:p></o:p></span></p>

<p class=sub style='margin-left:72.0pt'><font size=2 face=Arial><span
lang=EN-GB style='font-size:10.0pt;font-family:Arial'>Hi,<o:p></o:p></span></font></p>

<p class=sub style='margin-left:72.0pt'><font size=2 face=Arial><span
lang=EN-GB style='font-size:10.0pt;font-family:Arial'>I am trying to check if the
content is valid in my JSP using method CmsObject.existsResource(String
resource). I am trying to pass in the full patch to the resource within VFS
using method CmsResource.getRootPath(), however it seems that
CmsObject.existsResource(String resource) is expecting the resource patch
without the site identifier (</span></font><font size=2 face=Arial><span
style='font-size:10.0pt;font-family:Arial'>this case /sites/default/). Is this
how it should work or should method </span></font><font size=2 face=Arial><span
lang=EN-GB style='font-size:10.0pt;font-family:Arial'>CmsObject.existsResource(String
resource) respond to CmsResource.getRootPath() (which would be more consistent
in my mind anyway)?<o:p></o:p></span></font></p>

<p class=sub style='margin-left:72.0pt'><font size=2 face=Arial><span
lang=EN-GB style='font-size:10.0pt;font-family:Arial'>Regards,<o:p></o:p></span></font></p>

<p class=sub style='margin-left:72.0pt'><font size=2 face=Arial><span
lang=EN-GB style='font-size:10.0pt;font-family:Arial'>Olli<o:p></o:p></span></font></p>

<p class=MsoNormal style='margin-left:72.0pt'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'><o:p> </o:p></span></font></p>

<p style='margin-left:72.0pt'><font size=2 face="Times New Roman"><span
style='font-size:10.0pt'>--<br>
No virus found in this outgoing message.<br>
Checked by AVG Anti-Virus.<br>
Version: 7.0.300 / Virus Database: 265.8.8 - Release Date: 14/02/2005</span></font><o:p></o:p></p>

</blockquote>

</div>

</body>

</html>
<BR>

<P><FONT SIZE=2>--<BR>
No virus found in this incoming message.<BR>
Checked by AVG Anti-Virus.<BR>
Version: 7.0.300 / Virus Database: 265.8.8 - Release Date: 14/02/2005<BR>
</FONT> </P><BR>

<P><FONT SIZE=2>--<BR>
No virus found in this outgoing message.<BR>
Checked by AVG Anti-Virus.<BR>
Version: 7.0.300 / Virus Database: 265.8.8 - Release Date: 14/02/2005<BR>
</FONT> </P><BR>

<P><FONT SIZE=2>--<BR>
No virus found in this outgoing message.<BR>
Checked by AVG Anti-Virus.<BR>
Version: 7.0.300 / Virus Database: 265.8.8 - Release Date: 14/02/2005<BR>
</FONT> </P>