[opencms-dev] Use of CmsPublishManager in OpenCms 8
Tobias Karrer
kartobi at googlemail.com
Wed Sep 19 17:04:51 CEST 2012
And which exception?
Am 19.09.2012 13:37, schrieb Yves Glodt:
> In fact when I say "it does not work as expected" I mean:
>
> There is an exception without a message (null) happening on calling
> cmsPublish.publishResource.
>
>
>
> On 19 September 2012 10:59, Yves Glodt <yg at mind.lu
> <mailto:yg at mind.lu>> wrote:
>
> Hello,
>
> In OpenCms 8 there is no longer CmsObject.publishResource(). So I
> tried to use the CmsPublishManager, but it does not work as expected.
>
> Here is my code:
>
> CmsObject cms = OpenCms.initCmsObject("Guest");
> cms.loginUser("user", "password");
> CmsProject project = cms.readProject("Offline");
> cms.getRequestContext().setCurrentProject(project);
> cms.getRequestContext().setSiteRoot("/sites/mysite.lu/
> <http://mysite.lu/>");
>
> CmsPublishManager cmsPublish = new CmsPublishManager();
> cmsPublish.initialize(cms);
> cmsPublish.publishResource(cms,"/images/articles/"+no_article);
>
> What's wrong with it?
>
> Best regards,
> Yves
>
>
>
>
> _______________________________________________
> This mail is sent to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please visit
> http://lists.opencms.org/cgi-bin/mailman/listinfo/opencms-dev
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20120919/a36079ca/attachment.htm>
More information about the opencms-dev
mailing list