Authentication failed: define an own error page

Apr 13, 2011 at 9:03 AM

Hi all,

I am new to WAFFLE and used the waffle-filter demo for my web appliation in Tomcat.
Everything works fine and the windows authentication is passed to thebrowser and I can access the username. If I use an alternate browser with no
windows authentification enabled (for example Firefox), a popup appears and allows me to log in manually. So far so good.

But if I don't know the login information and cancel the login dialog a 401 error is raised (of course). My question is:
Can I configure WAFFLE to display a own page when the login fails (the original login page of our application should be displayed)?

Of course I can't set the error-page parameter for 401 error in the web.xml because this would disable the whole authentication method.

Anyone has an idea how to define a page that should be opened when the login fails?

Thanks in advance.

Greetings from germany,

Apr 13, 2011 at 12:11 PM

I think that if you cancel an authentication dialog there're no more requests sent to the server. Which means you can't render a page. I would do a mixed-mode authentication where you present a login page for the user with a choice of entering a username/password or trying windows auth. If they try windows auth and it fails, they probably won't try it again ;)

Btw, you should be able to configure Firefox to do windows auth without prompts. 

Apr 13, 2011 at 3:49 PM


thanks for the reply. This would be possible. I tried the waffle-mixed demo but I always get a 404 error when clicking the login button?
When I enter my credentials manually it works.

We found another solution so far. The login will be a separate application which forwards to the real application on success.