关于tomcat的认证功能问题 up有分

fightplane 2004-01-16 05:18:30
我使用tomcat5.0.16自带的验证功能。
启动tomcat的时候发现提示:WARNING: Security role name attracton used in an <auth-constraint> without being defined in a <security-role>
谁能给我提供一个完整的tomcat权限验证的例子?
或者推荐一个不错的tomcat开发用的书籍
...全文
179 31 打赏 收藏 转发到动态 举报
写回复
用AI写文章
31 条回复
切换为时间正序
请发表友善的回复…
发表回复
fightplane 2004-01-29
  • 打赏
  • 举报
回复
好了,问题基本解决了.
谢谢yu_shi_bin的热心帮助,谢谢所有来此捧场的朋友.
希望以后我们经常联系,共同进步.
linpeiwen 2004-01-19
  • 打赏
  • 举报
回复
UP
yu_shi_bin 2004-01-19
  • 打赏
  • 举报
回复
这是翻译,揭帖哦;
http://www.yesky.com/20020628/1618084_1.shtml

fightplane 2004-01-19
  • 打赏
  • 举报
回复
那位高人帮忙翻译,或者提供中文译本。
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/realm-howto.html#JDBCRealm
fightplane 2004-01-19
  • 打赏
  • 举报
回复
可能一些做过的朋友看到这里有些不耐烦了。
可惜在下是一菜鸟,现在还有些云里雾里。看到各位朋友都有共同的愿望想弄明白这个问题。
厚颜请yu_shi_bin兄把整个过程整理一下,贴在一个回帖里。
我使用的是tomcat5.0.16。

glucose 2004-01-19
  • 打赏
  • 举报
回复
yu_shi_bin(想我的朋友) 介绍的已经很详细了,采用数据库验证效果不错
ailibuli 2004-01-19
  • 打赏
  • 举报
回复
tomcat5.0.16自带的验证功能:
Basic,Digest,Form,Client-Cert.
Form?
chashui 2004-01-18
  • 打赏
  • 举报
回复
up
pantao2003 2004-01-18
  • 打赏
  • 举报
回复
upupupup!!!
xu_kewei 2004-01-18
  • 打赏
  • 举报
回复
不会.
fightplane 2004-01-18
  • 打赏
  • 举报
回复
需要能够挂接数据库的例子
stonecsdn 2004-01-18
  • 打赏
  • 举报
回复
继续关注!_!
yu_shi_bin 2004-01-18
  • 打赏
  • 举报
回复
在数据库中建立
create table users (
user_name varchar(15) not null primary key,
user_pass varchar(15) not null
);

create table user_roles (
user_name varchar(15) not null,
role_name varchar(15) not null,
primary key (user_name, role_name)
);


具体看这个

http://jakarta.apache.org/tomcat/tomcat-5.0-doc/realm-howto.html#JDBCRealm
yupingping 2004-01-18
  • 打赏
  • 举报
回复
up
maxtool 2004-01-18
  • 打赏
  • 举报
回复
up,up,我也想知道那个高手能解决这个问题
lysk 2004-01-18
  • 打赏
  • 举报
回复
不会,帮你顶!
lkpei 2004-01-17
  • 打赏
  • 举报
回复
up
yu_shi_bin 2004-01-17
  • 打赏
  • 举报
回复
这是我以前做的
1。在tomcat下的conf下的tomcat-users.xml中配置一个user,如下:
<role rolename="airport"/>
<user username="airport" password="airport" roles="airport"/>

2.配置web.xml
在web-app标签里添加
<!-- Default login configuration uses form-based authentication -->
<login-config>
<auth-method>FORM</auth-method>
<realm-name>Example Form-Based Authentication Area</realm-name>
<form-login-config>
<form-login-page>/jsp/login.jsp</form-login-page> <!---登陆画面 自己配--->

<form-error-page>/jsp/error.jsp</form-error-page> <!---出错画面 自己配--->
</form-login-config>
</login-config>


<!-- Security roles referenced by this web application -->
<security-role>
<role-name>airport</role-name> <!--- tomcat-users.xml的角色 -->
</security-role>
chashui 2004-01-17
  • 打赏
  • 举报
回复
up
luckybeggar 2004-01-16
  • 打赏
  • 举报
回复
up
加载更多回复(11)

81,091

社区成员

发帖
与我相关
我的任务
社区描述
Java Web 开发
社区管理员
  • Web 开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧