[opencms-dev] Reading File in system folder

Daniel Noatnick dno at archikart.de
Fri Mar 11 10:18:40 CET 2005


Hallo group,

I am a new user of opencms and I use opencms 6b1, Tomcat 4.1.30, MySQL 4.0.23 on WinXP SP2. I have create a module, and my site is located under  /sites/mysite/
In /system/modules/mymodule/elements/ is a JSP, which should read the content of my default_body located in /system/modules/mymodule/default_bodies/

When I try to access my default_body, I get a CmsVfsResourceNotFoundException.
Here is my code snippet from /system/modules/mymodule/elements/read_content.jsp


CmsJspActionElement cms = new CmsJSPActionElement(pageContext, request, response);

CmsFile default_body = cms.getCmsObject().readFile("../default_bodies/my_default_body");


Here I get this exception:
org.opencms.file.CmsVfsResourceNotFoundException: [org.opencms.db.mysql.CmsVfsDriver.readResource/3] /sites/mysite/../default_bodies/my_default_body [Code 2 - Resource not found!]

The read_content.jsp is included as a cms:template in my default template.

What is the right path to access my default body?

Thanks a lot

Daniel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20050311/8e4982e7/attachment.htm>


More information about the opencms-dev mailing list