User redirect after login


I use CustomFormAuthenticationMechanismDefinition for my web app and I want to redirect to a different welcome page based on logged in user group. What is a recommended approach to do that?

OK a little bit more inforamtion:
My web.xml setting:


I have settings for these security-constraint with recquired auth-constraint for access

/app/* is an application users area
/client/* is client path

For login action I have this code:

public void execute() throws IOException {
    switch (processAuthentication()) {
        case SEND_CONTINUE:               
        case SEND_FAILURE:                
            fc.addMessage(null, new FacesMessage(FacesMessage.SEVERITY_ERROR, "Invalid Credentials", null));
        case SUCCESS:              
            if (isClientRole()) {
                context.redirect(context.getRequestContextPath() + "/client/nets.xhtml");
            } else {                    
                context.redirect(context.getRequestContextPath() + "/app/index.xhtml");

private AuthenticationStatus processAuthentication() {
    return securityContext.authenticate((HttpServletRequest) context.getRequest(),
            (HttpServletResponse) context.getResponse(),
                    .credential(new UsernamePasswordCredential(username, password)));

SUCCESS part works as expected, but SEND_CONTINUE part is still unknown behavior like described in this question and I can’t find, how to control it.