tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 18040] - Entering <error-page> in web.xml for error code 401 BASIC unexpected behaviour
Date Fri, 25 Jul 2003 15:02:35 GMT
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





------- Additional Comments From pradeepk@soft-point.com  2003-07-25 15:02 -------
The following works in Tomcat 4.1.24:

Convert your error page to a jsp and add the following to the top of the file:
<%
String realmName = "xxx; // Specify the realm name from web.xml
response.setHeader("WWW-Authenticate",
			   "Basic realm=\"" + realmName + "\"");
response.setStatus(HttpServletResponse.SC_UNAUTHORIZED);
%>

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


Mime
View raw message