[opencms-dev] OpenCMS and portlets.
ttarrant at etnoteam.it
ttarrant at etnoteam.it
Wed Jul 28 16:58:01 CEST 2004
> <%@ page import="org.opencms.main.*, org.opencms.file.*" %>
> <% CmsObject cms = OpenCms.initCmsObject("Guest"); %>
> <p>Now I am user: <b><%= cms.getRequestContext().currentUser().getName()
> %></b></p>
> <% cms.loginUser("Admin", "admin"); %>
> <p>Now I am user: <b><%= cms.getRequestContext().currentUser().getName()
> %></b></p>
Coincidentally, that is also what I needed. I also need to set the current project to offline. I see I can use:
cms.getRequestContext().setCurrentProject(CmsProject)
How can I retrieve the CmsProject for the "Offline" project ?
Tristan
More information about the opencms-dev
mailing list