Problem: the following problem occurs when you configure the Tomcat runtime environment today,
The catalina_home environment variable is not defined correctly
This environment variable is needed to run this program
Then the catalina_home environment variable is added, and a new problem occurs.
The java_home environment variable is not defined correctly
This environment variable is needed to run this program
NB: java_home shocould point to a JDK not a JRE
The java_home path must be correct.
Solution: Change java_home to jre_home.
Solution: The java_home setting is incorrect. JDK is the installation path. JRE is the one in JDK.
========================================================== ======================================
Configure the manager username and password in Tomcat
Add in CONF/tomcat-users.xml:
<Role rolename = "manager"/>
<Role rolename = "admin"/>
<User Username = "admin" Password = "123456" roles = "Admin, Manager"/>
========================================================== ========================================
Easy to use, Java environment variable settings:
1. Install JDK. You can customize the installation directory and other information during the installation process. For example, select D: \ Java \ jdk1.5.0 _ 08 as the installation directory;
2. After the installation is complete, right-click "my computer" and click "properties ";
3. Select the "advanced" tab and click "environment variables ";
4. In "system variables", set three attributes: java_home, path, and classpath (case-insensitive). if it already exists, click "edit". If it does not exist, click "new ";
5. java_home indicates the JDK installation path, which is the path D: \ Java \ jdk1.5.0 _ 08 selected during the installation. This path contains Lib, bin, JRE, and other folders (it is best to set this variable, because in the future, tomcat, eclipse, and so on all need to follow * this variable );
Path allows the system to recognize Java commands in any path. It is set:
% Java_home % \ bin; % java_home % \ JRE \ bin
Classpath is the class or lib path of the Java load class. Only the class in classpath can be identified by the Java command and set:
.; % Java_home % \ Lib \ DT. jar; % java_home % \ Lib \ tools. Jar (Add. to indicate the current path)
% Java_home % refers to the previously specified java_home;
6. "Start"->; "run", type "cmd ";
7. type the following commands: "Java-version", "Java", and "javac". If a screen is displayed, the environment variable is successfully configured;