JSP Tutorials - Herong's Tutorial Examples - v5.11, by Herong Yang
Setting Up Tomcat Server Admin Access
This section provides a tutorial example on how to set up admin access (user role, name and password) to Apache Tomcat server. 2 entries are needed in the conf\tomcat-users.xml file: 'role' and 'user'.
Having Tomcat installed and started correctly, the next thing to do is to set up the admin username and password, so that you can manage the server from the Web GUI. This can be done by adding user roles, names and passwords in the server configuration file, tomcat-users.xml.
1. Edit \local\tomcat\conf\tomcat-users.xml with Notepad.
2. Add 2 lines near the end of the file to set up a user role and a user login:
<?xml version='1.0' encoding='utf-8'?> <!-- ... license info ... --> <tomcat-users> <!-- NOTE: By default, no user is included in the "manager-gui" role required to operate the "/manager/html" web application. If you wish to use this app, you must define such a user - the username and password are arbitrary. --> <!-- NOTE: The sample user and role entries below are wrapped in a comment and thus are ignored when reading this file. Do not forget to remove <!.. ..> that surrounds them. --> <!-- <role rolename="tomcat"/> <role rolename="role1"/> <user username="tomcat" password="tomcat" roles="tomcat"/> <user username="both" password="tomcat" roles="tomcat,role1"/> <user username="role1" password="tomcat" roles="role1"/> --> <role rolename="manager-gui"/> <user username="herong" password="s3cret" roles="manager-gui"/> </tomcat-users>
By default, Tomcat supports the following user roles that you can use to set up multiple logins for different level of accesses:
Table of Contents
JSP (JavaServer Pages) Overview
►Tomcat Installation on Windows Systems
Downloading and Installing Tomcat
►Setting Up Tomcat Server Admin Access
Reviewing Tomcat Server Status Page
Tomcat Web Application Manager
My First HTML Page - hello.html
Syntax of JSP Pages and JSP Documents
JavaBean Objects and "useBean" Action Elements
Managing HTTP Response Header Lines
Non-ASCII Characters Support in JSP Pages
Overview of JSTL (JSP Standard Tag Libraries)
Multiple Tags Working Together
Using Tomcat on CentOS Systems
Connecting to SQL Server from Servlet