Apache TomCat拒绝访问文件

问题描述

我想拒绝对Apache Tomcat服务器上某些文件的访问。 我阅读了document / articles / e.t.c。,都写过编写web.xml的内容,但是我在tomcat_home / conf目录中执行此操作,重新启动TomCat服务器,但没有任何反应。请帮帮我!

我已经在Web应用标签添加

     <security-constraint>
  <web-resource-collection>
    <url-pattern>/sample</url-pattern>
    <http-method>GET</http-method>
  </web-resource-collection>
 <auth-constraint>
<role-name>managers</role-name>

</auth-constraint>
    </security-constraint>
    <login-config>
    <auth-method>BASIC</auth-method>
    <realm-name>Test Realm</realm-name>
    </login-config>

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)