1. WebApp itself Web.xml file: Configuring container roles and resource access, etc.
2. Roles.properties and users.properties in the web-inf / class directory, configure users, and user roles, the role here is the role defined in the web.xml file.
3. Server / default / cof / login-config.xml, define the login policies used by each WebApp, which is to define login-module.
4. Web-INF / JBOSS-Web.xml file, configure the correspondence between the login policies in this webApp and Login-Config.xml.