Tomcat 中的 BASIC验证
来源:互联网 发布:淘宝商家放单群 编辑:程序博客网 时间:2024/06/10 00:39
K:/tomcat/conf/tomcat-users.xml
<?xml version='1.0' encoding='utf-8'?>
<tomcat-users>
<role rolename="tomcat"/>
<role rolename="role1"/>
<role rolename="manager"/>
<user username="tomcat" password="tomcat" roles="tomcat"/>
<user username="role1" password="tomcat" roles="role1"/>
<user username="both" password="tomcat" roles="tomcat,role1"/>
<user username="bitan" password="bitan" roles="manager"/>
</tomcat-users>
web.xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
version="2.4">
<security-constraint>
<web-resource-collection>
<url-pattern>/jsp/*</url-pattern>
</web-resource-collection>
<auth-constraint>
<role-name>manager</role-name>
</auth-constraint>
</security-constraint>
<login-config>
<auth-method>BASIC</auth-method>
</login-config>
</web-app>
K:/tomcat/webapps/test9/jsp/auth.jsp
<%@ page contentType="text/html;charset=GBK" %>
<h1>Yeah, You can see me now!</h1>
http://localhost:2000/test9/jsp/auth.jsp
将跳出一个登陆窗口,键入user=bitan,password=bitan后显示:
Yeah, You can see me now!
- Tomcat 中的 BASIC验证
- tomcat basic验证
- tomcat配合实现basic与FORM验证
- tomcat配合实现basic与FORM验证
- tomcat配合实现basic与FORM验证
- HTTP 验证 Tomcat中进行基本验证 (Basic Authentication) 和摘要验证 (Digest Authentication)
- HTTP 验证 Tomcat中进行基本验证 (Basic Authentication) 和摘要验证 (Digest Authentication)
- Http Basic Authorizaition验证
- Tomcat Basic Authentication
- Tomcat配置Basic Authentication
- Tomcat WebSocket basic authentication
- Basic验证的Domain处理
- ASIHttpRequest登录与Basic验证
- zookeeper basic 01 安装 验证
- Visual Basic 身份证号验证程序
- Tomcat BASIC & FORM 安全校验
- HTTP Basic Authentication验证WCF Data Service
- Java中,使用HTTP Basic进行验证
- Web搜索引擎设计和实现分析 (ZZ)
- 收藏网址
- MySQL常规管理
- 用SQL计算名次
- 开始Blog了
- Tomcat 中的 BASIC验证
- 九阳真经
- java连接SqlServer2000数据库实例
- 向蚂蚁致敬(1)
- 向蚂蚁(ant)致敬(2)
- telnetd的小问题
- 硬盘安装Debian经历
- DOM方式与SAX方式的比较
- 降龙十八掌