Thanks again!
I already figured out the role-mapping in sun-web.xml. But as I can't access the realm from my code, I couldn't get the authentication code (that I included before) to work.
Because I _do_ want different kinds of roles.
So I'll just get to work on using Glassfish's authentication mechanism and then just try to access the roles through the HttpServletRequest.
[Message sent by forum member 'lvdpal' (lvdpal)]
http://forums.java.net/jive/thread.jspa?messageID=339774