By: Emiley J.
Everyone is familiar with usernames and passwords, but what are roles? Roles are logical ways to describe groups of users who have similar responsibilities, such as manager or databaseAdmin. Example below shows a tomcat-users.xml file that creates two roles and two users with two aptly named XML elements: role and user.
The tomcat-users XML file
<?xml version='1.0' encoding='utf-8'?> <tomcat-users> <role rolename="dbadmin"/> <role rolename="manager"/> <user username="BruceP" password="bwperry" roles="dbadmin,manager"/> <user username="JillH" password="jhayward" roles="manager"/> </tomcat-users>
In above example, the user BruceP is associated with two roles (dbadmin and manager), while user JillH is associated only with the manager role. Tomcat uses this file when authenticating users with BASIC and form-based authentication
Most Viewed Articles (in Java )
Latest Articles (in Java)
Comment on this tutorial
- Data Science
- Cloud Computing
- Java Beans
- Mac OS X
- Office 365
- Tech Reviews
Subscribe to Tutorials
2. Hi, these are the lines i added after i downloaded
View Tutorial By: sandeep,p at 2012-11-22 10:17:07
3. After edit tomcat-user file and restart sevice ..i
View Tutorial By: Rajesh Perumal at 2013-01-08 06:29:21
8. Wow, that's what I was exploring for, what a data!
View Tutorial By: what is list of forex companies in india at 2017-08-31 11:53:27