JAVA_HOME:E:\soft\Java\jdk1.5.0_10
Path:%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%JAVA_HOME%\bin
CATALINA_HOME:E:\Tomcat
CATALINA_BASE=E:\Tomcat
ClassPath=%
JAVA_HOME%\lib\dt.jar;%
JAVA_HOME%\lib\tools.jar;%CATALINA_HOME%\common\lib\servlet-api.jar
有时候Tomcat的控制台会怎么也访问不了,什么用户名和密码都进不去,其实是因为少了配置文件:
%CATALINA_HOME%\conf\ tomcat-users.xml:
<?xml version='1.0' encoding='utf-8'?>
<tomcat-users>
<role rolename="tomcat"/>
<role rolename="role1"/>
<role rolename="manager"/>
<role rolename="admin"/>
<user username="tomcat" password="tomcat" roles="tomcat"/>
<user username="both" password="tomcat" roles="tomcat,role1"/>
<user username="role1" password="tomcat" roles="role1"/>
<user username="admin" password="" roles="admin,manager"/>
</tomcat-users>
<tomcat-users>
<role rolename="tomcat"/>
<role rolename="role1"/>
<role rolename="manager"/>
<role rolename="admin"/>
<user username="tomcat" password="tomcat" roles="tomcat"/>
<user username="both" password="tomcat" roles="tomcat,role1"/>
<user username="role1" password="tomcat" roles="role1"/>
<user username="admin" password="" roles="admin,manager"/>
</tomcat-users>
这样就可以用admin和空密码登陆了。