Thanks - that sounds exactly what I observed in my case where the login page
(HomePage class) gets redisplayed after I entered the user name and

I am looking at some sample code with Stateless login forms, in addition to
using StatelessForm instead Form, a bind() is called too after
authenticate().  So I changed my LoginForm as follows (note that LoginForm
is part of my HomePage class):

public class LoginForm extends StatelessForm<Login> {

        private static final Logger logger =

        private static final long serialVersionUID = 1L;

        private TextField<String> username;
        private PasswordTextField password;

        public LoginForm(String id) {
                super(id, new CompoundPropertyModel<Login>(new Login()));

                username = new TextField<String>("username");
                password = new PasswordTextField("password");

        protected void onSubmit() {
                Login login = getModelObject();

                AuthenticatedWebSession session = AuthenticatedWebSession.get();
                if(session instanceof AwolAuthenticatedWebSession) {
                        logger.debug("session is AwolAuthenticatedWebSession");
                if (session.authenticate(login.getUsername(), 
login.getPassword())) {
                        logger.debug("authentication successful");
                        if (session.isTemporary()) {
                                logger.debug("session temporary, bind to 
                                session.bind();  // according to sample code, 
this makes the temporary
session used by the stateless login page permanent

                else {
                        error("Invalid credentials");

But this code change does not seem to work either.  The first time I log in,
the session.isTemporary returns true, so it did session.bind().  But after
continueToOriginalDestination(), it is still the login page displayed, it
does not go on to MainPage.  If I enter username/password again, this time,
the code seems to get a session.isTemporary returns false, and
continueToOriginalDestination() still does not go on to MainPage.

Anything else I am missing here?  Thanks for your help!

View this message in context:
Sent from the Users forum mailing list archive at

To unsubscribe, e-mail:
For additional commands, e-mail:

Reply via email to