ITPub博客

首页 > IT基础架构 > 网络安全 > tomcat怎么设置跟iis那种类似的访问密码

tomcat怎么设置跟iis那种类似的访问密码

原创 网络安全 作者:rainytag 时间:2007-06-28 21:20:49 0 删除 编辑
问题:tomcat怎么设置访问密码?跟iis那种类似的 ?

回答:

例如你要控制对ROOT目录下文件的访问:

首先更改$TOMCAT_HOME/ROOT/WEB-INF/web.xml

1。在和之间加入





Entire Application

/*





<!-- NOTE: This role is not present in the default users file -->

user







<!-- Define the Login Configuration for this Application -->



BASIC

TEST ACCESS CONTROL





2。然后在$TOMCAT_HOME/conf/tomcat-users.xml中加入



roles的名字和web.xml中的相对应



在TOMCAT4.03中测试通过[@more@]

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/9650775/viewspace-921960/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2008-01-01

  • 博文量
    652
  • 访问量
    2207663