web.xml设置过滤直接访问
<security-constraint>
<web-resource-collection>
<web-resource-name>JSPs</web-resource-name>
<url-pattern>/admin/*</url-pattern><!-- 拒绝直接访问web文件夹下的所有页面 -->
</web-resource-collection>
<auth-constraint/>
</security-constraint>
<login-config>
<auth-method>BASIC</auth-method><!-- 验证方式(BASIC/FORM) -->
</login-config>
--------------------------------------------------------------------------------------------------------------------------------------------
作者:Honey_Badger —— 觉得这文章好,点一下左下角
出处:http://tk55.cnblogs.com/
posted on 2018-05-05 03:52 Honey_Badger 阅读(450) 评论(0) 收藏 举报
浙公网安备 33010602011771号