[opencms] Re: [opencms-dev] (6) (OT) Getting CmsJspActionElement from strutsaction
Jorge González
informatico at hotelparadisepark.com
Tue Jul 5 13:31:49 CEST 2005
Ok, now i can check login using this code...
CmsObject cmso = OpenCms.initCmsObject("Guest");
try {
cmso.loginUser(userName, password);
}catch (Exception e) {
ActionError ae = new ActionError("login failed");
ActionErrors aes = new ActionErrors();
aes.add(ActionErrors.GLOBAL_ERROR, ae);
log.debug("login failed user "+userName);
this.saveErrors(request, aes);
return mapping.findForward("fail");
}
But after login, the session is not updated, so no login is produced.
I know the "CmsObject cmso" object is a local param, but i don't know how to
access the cms object from the action code.
Could anybody provide a code snippet ?
Thanks
More information about the opencms-dev
mailing list