Role Management

How to manage Roles in vaadin Aplication using Session variable
Please Help me

Are you trying to do programmatic security, for instance checking isUserInRole() to decide what information to show? If so, what works for me is to have my application class implement com.vaadin.terminal.gwt.server.HttpServletRequestListener. Then I implement onRequestStart() to store the HttpServletRequest at the beginning of each request and can use it to check the user principal, check roles, etc. You can grab the HttpSession object from it as well if you need it.

Here’s the API


I’m not quite sure what you mean. If you are looking for role based access control, then take a look at the
Application Foundation
and its
authorization module
, it will provide you with an easy-to-use, role based permission management. If you are just looking at storing data in session variables, then remember that Vaadin is statefull, so it will suffice that you have a reference to the data in normal class variables. To access a class variable in a static way, take a look at the
ThreadLocal pattern

I agree with Kim. If you are looking for role based access give the Application Foundation a try - its very easy to use.