I've been trying to get form-based login with jdbcRealm working, but I'm having a few problems.
Spent countless hours searching for an answer, but I can't find a solution.
First, I'll go through my configuration.
In the Glassfish Admin Console, I added a new realm under Configuration->Security->Realms:
The database connection is working, as I've been using it with the application before adding any login configuration.
I have the following table defined:
User contains: 'admin','76a2173be6393254e72ffa4d6df1030a'
Group contains: 'admin','Administrator'
The login page contains the following form:
Next, in web.xml:
And lastly, sun-web.xml:
Submitting my username/password on the login page results in a login failure, directing me to the login error page.
I found a blog post that suggested CHECKing " Default Principal To Role Mapping" under the Glassfish Security options:
http://gesker.blogspot.com/2007/03/jspwikiglassfish-install-part-11-of-18.html In addition, I added the following to domain.xml (in order to get more detailed information):
The result was the following:
Any help would be appreciated.
[ January 14, 2008: Message edited by: Lars Zinkoff ]
[ January 14, 2008: Message edited by: Lars Zinkoff ]