tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Barry L. White" <barrywh...@charter.net>
Subject Basic Authentication error page? [repost]
Date Thu, 29 Nov 2001 05:19:54 GMT
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:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>


Mime
View raw message