the url-pattern is usually the contextPath such as http://host:port + ContextPath is compared to the <url-pattern>
http://edocs.bea.com/wls/docs61/webapp/web_xml.html what is the webapplication name? what happens when you supply the webapplication name to <url-pattern> and restart TC? Martin ______________________________________________ Disclaimer and Confidentiality/Verzicht und Vertraulichkeitanmerkung / Note de déni et de confidentialité This message is confidential. If you should not be the intended receiver, then we ask politely to report. Each unauthorized forwarding or manufacturing of a copy is inadmissible. This message serves only for the exchange of information and has no legal binding effect. Due to the easy manipulation of emails we cannot take responsibility over the the contents. Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen. Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni. > Subject: RE: customize HTTP Status 401 error page > Date: Thu, 23 Apr 2009 15:19:39 -0500 > From: jill....@alverno.edu > To: users@tomcat.apache.org > > Here is web.xml > <web-app> > <display-name>Faculty Resources</display-name> > <security-constraint> > <web-resource-collection> > <web-resource-name>FACRES</web-resource-name> > <url-pattern>*</url-pattern> > </web-resource-collection> > <auth-constraint> > <role-name>CN=FacultyStaff,OU=Groups,OU=EMP,DC=AC</role-name> > </auth-constraint> > </security-constraint> > <login-config> > <auth-method>BASIC</auth-method> > <realm-name>TESTING</realm-name> > </login-config> > <error-page> > <error-code>401</error-code> > <location>/error.html</location> > </error-page> > > <security-role> > <role-name>CN=FacultyStaff,OU=Groups,OU=EMP,DC=AC</role-name> > </security-role> > > <session-config> > <session-timeout>2</session-timeout> > </session-config> > </web-app> > > Yes, if it is run on Window, no credential window was prompted, but instead, > the error.html > However, if it is run on Linux, credential window was prompted, but, if > unsuccessful, or clicking "Cancel", 401 error message still show up. > <error-page> was ignored. > > Jill > -----Original Message----- > From: Christopher Schultz [mailto:ch...@christopherschultz.net] > Sent: Thursday, April 23, 2009 2:55 PM > To: Tomcat Users List > Subject: Re: customize HTTP Status 401 error page > > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Jill, > > On 4/23/2009 1:20 PM, Jill Han wrote: > > I still need helps. > > Here is the web.xml > > ... > > <login-config> > > <auth-method>BASIC</auth-method> > > <realm-name>TESTING</realm-name> > > </login-config> > > > > <error-page> > > <error-code>401</error-code> > > <location>/error.html</location> > > </error-page> > > ... > > The error.html is replaced the 401 error message, however there will be no > > authentication window prompted, error.html is somehow loaded all the time. > > What do your <security-constraint> elements look like? > > Are you saying you are getting a 401 response but never being asked for > your credentials? > > - -chris > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.9 (MingW32) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ > > iEYEARECAAYFAknwx6UACgkQ9CaO5/Lv0PBfLACfU2OGHvHDUX0qeCeaIVoRoJz9 > rO4AoK5hbI7c96Dz31J0ZCaOhLzgPcaS > =xKJK > -----END PGP SIGNATURE----- > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > _________________________________________________________________ Rediscover Hotmail®: Now available on your iPhone or BlackBerry http://windowslive.com/RediscoverHotmail?ocid=TXT_TAGLM_WL_HM_Rediscover_Mobile2_042009