标签:style blog color io sp 文件 div on log
Tomcat 6.0\conf\tomcat-users.xml目录下添加用户
<tomcat-users>
<role rolename="manager"/>
<role rolename="admin"/>
<role rolename="lluser"> (服务器启动后自动增加的服务器启动后)
<user username="admin" password="lcp" roles="admin,manager"/>
<user username="lop" password="lop" roles="admin"/>
user username="ll" password="lcp" roles="lluser">
</tomcat-users>
完成登录验证还需要配置web-inf/web.xml文件
<welcome-file-list> <welcome-file>main.html</welcome-file> </welcome-file-list> <security-constraint> <web-resource-collection>RegisteredUsers</web-resource-collection> <url-pattern>/count.jsp</url-pattern> <auth-constraint> <role-name>lluser</role-name> <role-name>admin</role-name> </auth-constraint> </security-constraint> <login-config> <auto-method>BASIC</auto-method> <realm-name>Registered Users</realm-name> </login-config> <security-role> <role-name>lluser</role-name> </security-role> <security-role> <role-name>admin</role-name> </security-role>
标签:style blog color io sp 文件 div on log
原文地址:http://www.cnblogs.com/lcpholdon/p/4051469.html