if we wanted to define security roles in the deployment descriptor, we do it this way right?
<security-constraint>
<web-resource-collection>
<web-resource-name>Protected Area</web-resource-name>
<url-pattern>/jsp/security/protected/*</url-pattern>
<http-method>PUT</http-method>
<http-method>DELETE</http-method>
<http-method>GET</http-method>
<http-method>POST</http-method>
</web-resource-collection>
<auth-constraint>
<role-name>role1</role-name>
<role-name>employee</role-name>
</auth-constraint>
</security-constraint>
<!-- Security roles referenced by this web application -->
<security-role>
<role-name>role1</role-name>
</security-role>
<security-role>
<role-name>employee</role-name>
</security-role>
Let's say my application has 50 users. Let's say User1 to User50 and are stored in my application's database.
question is, how to I connect a certain user to a security role defined in web.xml? let's say upon successful authentication of User1, I want him to have "employee" role. For User2, I want him to have "role1".
thanks.