hi Barry,
if you want to customize your error page or login page
you had better use form based authentication.
below is a website where you can get enough information about that:

http://www.onjava.com/pub/a/onjava/2001/08/06/webform.html?page=1
hope it helps :)

----- Original Message -----
From: "Barry L. White" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Thursday, November 29, 2001 1:19 PM
Subject: Basic Authentication error page? [repost]


> OS: W2K
> Tomcat: 4.0
>
> I have been searching through the Tomcat and Sun docs to try to find out
if
> it is possible to have an error page with BASIC authentication.  I would
> prefer to show a custom error page when a user mistypes there username or
> password, rather than general the ERROR 401 page.
>
> I know this is possible with Apache, but how do I do it with Tomcat?
>
> In my web.xml I have:
> <security-constraint>
>   <web-resource-collection>
>    <web-resource-name>inqadmin</web-resource-name>
>    <url-pattern>/admin/*</url-pattern>
>   </web-resource-collection>
>   <auth-constraint>
>    <role-name>inqadmin</role-name>
>   </auth-constraint>
>  </security-constraint>
>
>  <login-config>
>   <auth-method>BASIC</auth-method>
>   <realm-name>Test</realm-name>
>  </login-config>
>
> I can find no docs that say anything about having a <error-page> within
the
> <login-config>.
> I have tryed this both in and outside of the <login-config>:
> <error-page>
>   <error-code>401</error-code>
>   <location>/errors/401.html</location>
>  </error-page>
>
> But I get a error 500.
>
> Thanks for your time,
> Barry
>
>
>
> --
> To unsubscribe:   <mailto:[EMAIL PROTECTED]>
> For additional commands: <mailto:[EMAIL PROTECTED]>
> Troubles with the list: <mailto:[EMAIL PROTECTED]>
>
>



--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>

Reply via email to