AW: [opencms-dev] Re: Direct edit

Uhlig, Roman roman.uhlig at knve.de
Thu Mar 2 14:42:34 CET 2006


> Did you create an own login form?
> How do users log in?

> The idea is that you create an own JSP file which logs the user into
the system and then switches the project to whatever you want.
> Then the JSP would probably redirect the user to the index page of
your website, so that they could start right away with frontend-editing.

> Regards
> Christian

I have problems getting this working too. For a test, I just did a jsp
that logs in a workplace user and then sends him to the website he
should be able to edit:

<%@ page session="false" import="org.opencms.main.*, org.opencms.jsp.*,
org.opencms.file.*, java.lang.String" %>
<%
	CmsJspActionElement cms = new CmsJspActionElement(pageContext,
request, response);
	CmsObject cmsObject = OpenCms.initCmsObject( "Guest" );
	cmsObject.loginUser("xxx", "yyy");
	CmsProject cmsproject = cmsObject.readProject("Offline");
	cmsObject.getRequestContext().setCurrentProject(cmsproject);
	cmsObject.getRequestContext().setSiteRoot("/sites/default");
	response.sendRedirect(cms.link("/testsite/"));
%>

That seems to log in the user and redirects him, but no direct editing
is possible (which is, when I call the same site from within the
workplace).

Is there anybody who has achieved this yet and could help? I just can't
believe it's that difficult or impossible...

Best regards,
Roman Uhlig



More information about the opencms-dev mailing list