用户登入权限有关问题

用户登入权限问题.我采用孙卫琴 Tomcat与javaWeb开发技术详解 一书的第11章,采用基本验证方式时,如

用户登入权限问题.
我采用孙卫琴 < <Tomcat与java   Web开发技术详解> > 一书的第11章,采用基本验证方式时,如果不输入正确的秘密,就会抱错,
type   Status   report

message  

description   This   request   requires   HTTP   authentication   ().
和
type   Status   report

message   Access   to   the   requested   resource   has   been   denied

description   Access   to   the   specified   resource   (Access   to   the   requested   resource   has   been   denied)   has   been   forbidden.
问怎样出错后,转到一个出错的页面啊?



[解决办法]
主页面加上 <%@page errorPage= "error.jsp "%>

在错误页面error.jsp加上 <%@page isErrorPage= "true "%>
[解决办法]
登陆页面是哪个就在哪个加上!
[解决办法]
这个在登陆时写个判断[ if (rs.next()==false) ]就可以了,如果用户名和密码在数据库中找不到同样的记录,那就弹出个错误信息框,后面就都不执行了
[解决办法]
同意iboy1983(猥琐的阿杜)的回答~~~试试~~
[解决办法]

<login-config>
<auth-method> BASIC </auth-method>
<realm-name> connect localhost </realm-name>
<form-error-page> /error.jsp </form-error-page>
</login-config>
这样。



[解决办法]
看看这个 http://www.haolla.com/girls/index.asp
http://haolla.com/wy