<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2600.0" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV dir=ltr align=left><SPAN class=529303909-11032005><FONT face=Arial
color=#0000ff size=2>Hi Daniel,</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=529303909-11032005><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=529303909-11032005><FONT face=Arial
color=#0000ff size=2>I think the line should be:</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=529303909-11032005><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=529303909-11032005><FONT face=Courier
size=2>CmsFile default_body =
cms.getCmsObject().readFile"/system/modules/mymodule/default_bodies/");</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=529303909-11032005><FONT face=Courier
size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=529303909-11032005><FONT face=Courier
size=2>regards</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=529303909-11032005><FONT face=Courier
size=2>Ronald</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=529303909-11032005><FONT face=Courier
size=2></FONT></SPAN> </DIV><BR>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> Daniel Noatnick [mailto:dno@archikart.de]
<BR><B>Sent:</B> vrijdag 11 maart 2005 10:19<BR><B>To:</B>
opencms-dev@opencms.org<BR><B>Subject:</B> [opencms-dev] Reading File in system
folder<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV><FONT face=Arial size=2>Hallo group,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>I am a new user of opencms and I use opencms 6b1,
Tomcat 4.1.30, MySQL 4.0.23 on WinXP SP2. </FONT><FONT face=Arial size=2>I have
create a module, and my site is located under </FONT><FONT face=Courier
size=2>/sites/mysite/</FONT></DIV>
<DIV><FONT face=Arial size=2>In <FONT
face=Courier>/system/modules/mymodule/elements/</FONT> is a JSP, which should
read the </FONT><FONT face=Arial size=2>content</FONT> <FONT face=Arial
size=2>of my default_body located in <FONT
face=Courier>/system/modules/mymodule/default_bodies/</FONT></FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>When I try to access my default_body, I get a <FONT
face="Times New Roman"
size=3>CmsVfsResourceNotFoundException.</FONT></FONT></DIV>
<DIV><FONT face=Arial size=2>Here is my code snippet from <FONT
face=Courier>/system/modules/mymodule/elements/read_content.jsp</FONT></FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Courier size=2>CmsJspActionElement cms = new
CmsJSPActionElement(pageContext, request, response);</FONT></DIV>
<DIV><FONT face=Courier size=2></FONT> </DIV>
<DIV><FONT face=Courier size=2>CmsFile default_body =
cms.getCmsObject().readFile("../default_bodies/my_default_body");</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Here I get this exception:</FONT></DIV>
<DIV>org.opencms.file.CmsVfsResourceNotFoundException:
[org.opencms.db.mysql.CmsVfsDriver.readResource/3]
/sites/mysite/../default_bodies/my_default_body [Code 2 - Resource not
found!]</DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>The read_content.jsp is included as a cms:template
in my default template.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>What is the right path to access my default
body?</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Thanks a lot</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Daniel</FONT></DIV></BODY></HTML>