I am doing some authentication using BEA server. The program is like this. We have a login page where user enters his name and password. I have defined the user role in web.xml. Only registered users can access the editing page. I want to know how to do the name and password check with data stored in database. Also how to define roles in web.xml and link to appropriate page to which user has access.