You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Lukas Bradley <lu...@somnia.com> on 2003/08/13 04:32:27 UTC

Failed Authentication: 401 error-page strange behavior

I'm attempting to use a combination of an error-page for 401 codes and BASIC
authentication.  My version is Tomcat 4.1.27 on Windows XP.

Without the error-page, the authentication works fine.  A username/password
dialog is presented when attempting to enter the /sponsor, /webmaster, or
/admin directories.  However, with both the security-contraint and the
custom 401 error-page, only the /Beta.jsp is shown.  That is to say, the
dialog box is never shown-- the user is directed straight to the /Beta.jsp.

I've attempted to shutdown Tomcat, close all browsers, clean their cache,
destroy all cookies, deleted compiled pages, deleted serialized sessions,
and shave my cats, all to no avail.

Does anyone have any insight?  Other error-codes (500,404) work fine.  Only
the 401.  I've searched mail archives, and this problem has been mentioned
with earlier versions, but never quite in this manner.

 The web.xml looks as follows.

   <error-page>
        <error-code>401</error-code>
        <location>/Beta.jsp</location>
   </error-page>

 <security-constraint>
   <web-resource-collection>
     <web-resource-name>
       Entire Application
     </web-resource-name>
     <url-pattern>/sponsor/*</url-pattern>
     <url-pattern>/webmaster/*</url-pattern>
     <url-pattern>/admin/*</url-pattern>
   </web-resource-collection>
   <auth-constraint>
       <role-name>MyAdmin</role-name>
   </auth-constraint>
 </security-constraint>

 <login-config>
   <auth-method>BASIC</auth-method>
   <realm-name>My Members-only Area</realm-name>
</login-config>







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


Re: Failed Authentication: 401 error-page strange behavior

Posted by Lukas Bradley <lu...@somnia.com>.
In Bugzilla with a really bad hack fix.  I'm trying to reopen the ticket.

http://nagoya.apache.org/bugzilla/buglist.cgi?email1=&emailtype1=substring&emailassigned_to1=1&email2=&emailtype2=substring&emailreporter2=1&bugidtype=include&bug_id=&changedin=&votes=&chfieldfrom=&chfieldto=Now&chfieldvalue=&product=Tomcat+4&short_desc=401&short_desc_type=allwordssubstr&long_desc=&long_desc_type=allwordssubstr&bug_file_loc=&bug_file_loc_type=allwordssubstr&keywords=&keywords_type=allwords&field0-0-0=noop&type0-0-0=noop&value0-0-0=&cmdtype=doit&newqueryname=&order=%27Importance%27

Each of these has bad solutions, or states it is not a bug.  The one "fix"
does work, but it is very hackish.

Lukas





Re: Failed Authentication: 401 error-page strange behavior

Posted by Lukas Bradley <lu...@somnia.com>.
In Bugzilla with a really bad hack fix.  I'm trying to reopen the ticket.

http://nagoya.apache.org/bugzilla/buglist.cgi?email1=&emailtype1=substring&emailassigned_to1=1&email2=&emailtype2=substring&emailreporter2=1&bugidtype=include&bug_id=&changedin=&votes=&chfieldfrom=&chfieldto=Now&chfieldvalue=&product=Tomcat+4&short_desc=401&short_desc_type=allwordssubstr&long_desc=&long_desc_type=allwordssubstr&bug_file_loc=&bug_file_loc_type=allwordssubstr&keywords=&keywords_type=allwords&field0-0-0=noop&type0-0-0=noop&value0-0-0=&cmdtype=doit&newqueryname=&order=%27Importance%27

Each of these has bad solutions, or states it is not a bug.  The one "fix"
does work, but it is very hackish.

Lukas





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