You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2003/03/16 16:15:20 UTC

DO NOT REPLY [Bug 18040] New: - Entering in web.xml for error code 401 BASIC unexpected behaviour

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18040>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18040

Entering <error-page> in web.xml for error code 401 BASIC unexpected behaviour

           Summary: Entering <error-page> in web.xml for error code 401
                    BASIC unexpected behaviour
           Product: Tomcat 4
           Version: 4.1.18
          Platform: Macintosh
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Unknown
        AssignedTo: tomcat-dev@jakarta.apache.org
        ReportedBy: adam@autonomous.co.uk


when trying to use a custom error page for my webapp with BASIC auth, i get no 
name/pass challenge, i'm fowarded straight to the 401 error page

in my web.xml i have 
<snippet>

 <error-page>
        <error-code>401</error-code>
        <location>/error/401.html</location>
    </error-page>

<snip>....</snip>

    <security-constraint>
        <web-resource-collection>
           <web-resource-name>MyApplication</web-resource-name>
               <url-pattern>/admin/*</url-pattern>
               <url-pattern>/servlet/com.myapp.admin.*</url-pattern>
               <http-method>GET</http-method>
               <http-method>POST</http-method>
        </web-resource-collection>
        <auth-constraint>
            <role-name>myappadmin</role-name>
        </auth-constraint>
    </security-constraint>
    <login-config>
         <auth-method>BASIC</auth-method>
         <realm-name>MyApplication Realm</realm-name>
    </login-config>
    <security-role>
         <role-name>myappadmin</role-name>
    </security-role>
</snippet>

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org