tomcat 认证方式怎么配?
tomcat 4.03我在应用下面的WEB-INF下面放置了WEB.XML。
<role-name>中的tomcat是不是就是tomcat_user.xml中的roles啊??
为什么我在tomcat_user.xml中写了
<user name="tomcat" password="tomcat" roles="tomcat" />
还是不能登录啊??
web.xml片断如下
<!-- Define a Security Constraint on this Application -->
<security-constraint>
<web-resource-collection>
<web-resource-name>Entire Application</web-resource-name>
<url-pattern>/*</url-pattern>
</web-resource-collection>
<auth-constraint>
<!-- NOTE: This role is not present in the default users file -->
<role-name>tomcat</role-name>
</auth-constraint>
</security-constraint>
<!-- Define the Login Configuration for this Application -->
<login-config>
<auth-method>BASIC</auth-method>
<realm-name>tomcat apps</realm-name>
</login-config>