[opencms-dev] CmsImport

GALLONE, David D.GALLONE at aubay.lu
Wed Dec 1 09:56:35 CET 2004


Hello,

I'mm novice using OpenCms and I want to import a file in a OpenCMS
project using a class JAVA called in a template.

Hereafter the code to import a file from a filesystem. I receive a
"java.lang.NullPointerException. 
". What's wrong in this code ?

public Object getMail(CmsObject cms, String tagcontent, A_CmsXmlContent
doc, Object userObject) {
...
        I_CmsReport I_CmsRep = null;
        String  strFile = null;
        strFile = "c:\temp\myfile.txt";
        CmsImport cmsImp = new CmsImport(cms, strFile,
I_CmsWpConstants.C_VFS_PATH_LOCALES, I_CmsRep);
        cmsImp.importResources();

}


Thanks,
 David GALLONE

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20041201/6ea032f1/attachment.htm>


More information about the opencms-dev mailing list