[opencms-dev] opencms6 - logging in a webuser

bart vandendriessche bart at nascom.be
Tue Apr 19 10:50:54 CEST 2005


Hi,

I've been having some difficulties logging in users that are members of 
the Guests group. The requirement is to have several groups of users 
that can log in to the online project, but not to the offline project / 
workplace so that we can divide content according to several different 
guest groups. I've been trying to make a small login form in which a 
user can fill out his username / password, but I must be doing something 
wrong since I can't seem to log in a guest. Code is as follows:

    //get the required OpenCms Object
    CmsJspLoginBean cmsLogin    = new CmsJspLoginBean(pageContext, 
request, response);

    //variables to catch the parameters from the request
    String username             = "";
    String password             = "";
    String action               = request.getParameter("action");

    //catch the parameters if the user is trying to log in
    if ( "login".equals(action) ) {
        username                = request.getParameter("login");
        action                  = request.getParameter("password");

        //log in the user
        cmsLogin.login(username, password);
    }

If anyone could provide some pointers that would be great,

-Bart



More information about the opencms-dev mailing list