问题: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/
,如需转载,请注明出处,否则将追究法律责任。