[opencms-dev] Re: Direct edit

mahesh babu ksmaheshbabu at yahoo.com
Sat Mar 4 16:33:28 CET 2006


hi,

i have tried with cmsjsploginbean instead of
cmsjspaction element.

Initialize cmsjsplogin bean 

and pass offline projectname with redirect uri to
login method. Everyhting will be alright.

mahesh

--- Christian Steinert <christian_steinert at web.de>
wrote:

> 
> The OpenCms mailing list <opencms-dev at opencms.org>
> schrieb am 02.03.06 14:51:08:
> > 
> > 
> > > 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
> > 
> 
> Hi Roman,
> 
> I must admit, that I have not tried this yet.
> 
> What happens, if you do not redirect, but after
> logging in, etc output the following:
> 
> <cms:user property="name"/> 
>
<%=cmsObject.getRequestContext().getCurrentProject().getName()
> %>
> <%=cmsObject.getRequestContext().getSiteRoot() %>
> 
> 
> Regards
> Christian
> 
> 
>
______________________________________________________________________
> XXL-Speicher, PC-Virenschutz, Spartarife & mehr: Nur
> im WEB.DE Club!		
> Jetzt gratis testen!
> http://freemail.web.de/home/landingpad/?mc=021130
> 
> 
> _______________________________________________
> 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/mailman/listinfo/opencms-dev
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 



More information about the opencms-dev mailing list