[opencms-dev] Method missing in Opencms 5.0.1
Roedel, Mark
MarkRoedel at letu.edu
Wed Mar 10 23:58:02 CET 2004
We ran into this as well with some of our JSP code when moving from 5.0
to 5.0.1.
Try referencing getCmsObject() as a member of
com.opencms.flex.jsp.CmsJspActionElement instead of
com.opencms.flex.cache.CmsFlexRequest...that got things working for us.
--
Mark Roedel
Web Programmer / Analyst
LeTourneau University
_____
From: opencms-dev-admin at opencms.org
[mailto:opencms-dev-admin at opencms.org] On Behalf Of Miyuru C. Ratnayake
Sent: Tuesday, March 09, 2004 5:34 AM
To: opencms-dev at opencms.org
Subject: [opencms-dev] Method missing in Opencms 5.0.1
Hi I 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20040310/12e58e94/attachment.htm>
More information about the opencms-dev
mailing list