1.在%Tomcat_Home%/conf/Catalina/localhost中新建manager.xml,内容如下
<Context privileged="true" antiResourceLocking="false" docBase="${catalina.home}/webapps/manager"> <Valve className="org.apache.catalina.valves.RemoteAddrValve" allow="^.*$" /> </Context>
2.在%Tomcat_Home%/conf/tomcat-users.xml中添加
<role rolename="manager"/> <role rolename="manager-gui"/> <role rolename="admin"/> <user username="tomcat" password="password" roles="admin,manager,manager-gui"/>