[opencms-dev] Method missing in Opencms 5.0.1

Miyuru C. Ratnayake miyuruchanna at yahoo.com
Tue Mar 9 12:34:03 CET 2004


HiI used this method to create a CmsObject from a Request in a JSP file com.opencms.file.CmsObject cms = ((com.opencms.flex.cache.CmsFlexRequest)request).getCmsObject(); but in OpenCMS 5.0.0 its working properly but in OpenCMS 5.0.1 it is not working. There is no such method getCmsObject() in CmsFlexRequest in OpenCMS 5.0.1 My code is as follows     com.opencms.file.CmsObject cms = ((com.opencms.flex.cache.CmsFlexRequest)request).getCmsObject();  com.opencms.file.CmsRequestContext reqContext = cms.getRequestContext();   reqContext.setCurrentProject(4); String WORKING_PATH=reqContext.getUri();   com.opencms.core.CmsRequestHttpServlet req = (com.opencms.core.CmsRequestHttpServlet)(reqContext.getRequest());   java.util.Enumeration files = req.getFileNames();   Hashtable h=new Hashtable(2);   h.put("Title",req.getParameter("title")); h.put("NavText",req.getParameter("navText"));   while(files.hasMoreElements()){     String this_filename = (String) files.nextElement();     byte[]
 filecontent = req.getFile(this_filename);     cms.createResource(WORKING_PATH, this_filename, req.getParameter("type"), h, filecontent);  cms.unlockResource(WORKING_PATH + this_filename);  cms.publishResource(WORKING_PATH + this_filename);  }  I need to run this in Opencms 5.0.1 is there a different method to use.Thanks,Miyuru Ratnayake

---------------------------------
Do you Yahoo!?
Yahoo! Search - Find what you�re looking for faster.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20040309/71f7f12d/attachment.htm>


More information about the opencms-dev mailing list