tomcat 认证方式怎么配?

kkkppp好 2003-02-26 04:23:19
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>
...全文
15 回复 打赏 收藏 转发到动态 举报
写回复
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复

24,923

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 Apache
社区管理员
  • Apache
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧