Tomcat 的配置
1. 图形化控制台的相关配置
当启动tomcat之后,进入tomcat默认主页,在偏右上角的地方有三个按钮
,当我们点击进入的时候要求我们输入帐号密码。相关配置文件在
webapps/manager/WEB-INF路径下。使用无格式编辑器打开该路径下的web.xml
,在该文件的末尾部分可以看到如下配置片段
<!-- Define a Security Constraint on this Application -->
<!-- NOTE: None of these roles are present in the default users file -->
<security-constraint>
<web-resource-collection>
<!-- 访问/html/* 资源需要manager-gui角色 -->
<web-resource-name>HTML Manager interface (for humans)</web-resource-name>
<url-pattern>/html/*</url-pattern>
</web-resource-collection>
<auth-constraint>
<role-name>manager-gui</role-name>
</auth-constraint>
</security-constraint>
<security-constraint>
<web-resource-collection>
<!-- 访问 /text/* 资源需要manager-script角色 -->
<web-resource-name>Text Manager interface (for scripts)</web-resource-name>
<