Can't verify user role when doing form authentication with Vaadin

Hi all,

In my Vaadin application i try to make form login. I set a security constraint with folloging part of web.xml

	<display-name>AutoCine Security Constraints</display-name>
		<web-resource-name>A Protected Page</web-resource-name>

It works well, but when my com.vaadin.appliction which implements HttpServletRequestListener loads, inside onRequestStart() method

Principal principal = httpServletRequest.getUserPrincipal();
principal.getName() returns the principals name but

httpServletRequest.isUserInRole(“administrator”) doesn’t work.

Any idea??


Did you
declare the roles
in web.xml? The link I’ve included shows how to do it in web.xml, but it can also be done through annotations on the servlet class with Java EE 6.
Here is an example
of that from an old blog of mine.