[opencms-dev] Class CmsRequestHttpServlet
Alexander Kandzior
alex at opencms.org
Fri Mar 21 14:51:25 CET 2003
Laurent,
you can not create a new instance of the CmsObject on a JSP page,
use this code instead:
<%
com.opencms.flex.jsp.CmsJspActionElement cms =
new com.opencms.flex.jsp.CmsJspActionElement(pageContext, request,
response);
com.opencms.file.CmsObject cmsObject = cms.getCmsObject();
%>
Best Regards,
Alex.
Alexander Kandzior
Alkacon Software - The OpenCms Experts
http://www.alkacon.com
> -----Original Message-----
> From: owner-opencms-dev at www.opencms.org
> [mailto:owner-opencms-dev at www.opencms.org] On Behalf Of Laurent Vernet
> Sent: Friday, March 21, 2003 2:39 PM
> To: opencms
> Subject: [opencms-dev] Class CmsRequestHttpServlet
>
>
> Hi All,
>
> How to retrieve/construct a CmsRequestHttpServlet object to
> initialize the CmsObject by the call of :
>
> ...
> CmsObject cmsObject = new CmsObject();
> OpenCms oCms = cms.initUser(cmsObject,cmsRequest,
> cmsResponse, userName, groupName, projectId, cmsSession );
>
> in a jsp page.
>
> We can't build a 'CmsRequestHttpServlet' because there's no
> public constructor, but we can build a CmsExportRequest object.
>
> 2 solutions :
>
> 1) Make the 'CmsRequestHttpServlet' constructor public (it is
> 'private package' at the moment).
>
> 2) Add a factory to retrieve a 'CmsRequestHttpServlet' with a
> 'HttpServletRequest'.
>
>
> Is there any code sample to initialize the CmsObject in a jsp page.
>
> Regards,
>
> Laurent Vernet
> 148 Rue Anatole France
> 92688 Levallois-Perret Cedex
> T: +33 1 55 63 18 17
> E: laurent.vernet at fr.adp.com
>
>
>
>
>
More information about the opencms-dev
mailing list