----------------------------- Please read the FAQ! <http://java.apache.org/faq/> ----------------------------- I am deciding whether to send a 200 OK message ( as per normal ) or a 403 Forbidden response, and not using Apache <Location> rules at all. My problem is only that the page I generate for my 403 is not returned by Apache. In fact if I set the response code to 200 OK Apache replaces my page. ErrorDocument allows four ways to specify which error page to return, text, locally generated from cgi, local page and remote page. As I generate responses from any of a number of servlets none of these seem appropriate. I need a way to just pass my pages through. Thanks again, Gary -----Original Message----- From: Steve Ruby [mailto:[EMAIL PROTECTED]] Sent: 23 August 1999 17:58 To: Java Apache Users Subject: Re: HttpServletResponse's sendError() message not appearing as respon se ----------------------------- Please read the FAQ! <http://java.apache.org/faq/> ----------------------------- If it is forbiden by rule like <Location> </Location> then apache forbids access and the servlet isn't even called I guess you can do you own authentication at the servlet level then you would have control over that. Who is doing the "forbidding" now? On Mon, 23 Aug 1999, Venables, Gary wrote: > Hi, > > I am using JServ 1.0, Apache 1.3.6, WinNT 4.0 and Java 1.2 and want to return a >403 ( Forbidden ) status code and a message using HttpServletResponse's sendError( >int sc, String msg ) method. However the 403 message that arrives at my browser is >the Apache's standard 403 response. Is there some way to specify that the parameter >msg I provide from within my servlet is returned instead. The documentation for >ErrorDocument seems to not know how to deal with this case. > > My code: > public void doPost( HttpServletRequest request, > HttpServletResponse response ) > throws ServletException, IOException > { > // ... > response.sendError( 403, "My Forbidden Message" ); > } > > Apache's response: > > Forbidden > > You don't have permission to access /servlets/AuthorisationToUseServlet on this >server. > > > _____ > > Apache/1.3.6 Server at carrot.roke.co.uk <mailto:[EMAIL PROTECTED]> Port 80 > > > Many thanks, > Gary > > --- > Gary Venables > Engineer - IT and Networks > Roke Manor Research Ltd > Phone: +44 (0)1794 83 3512 > Fax: +44 (0)1794 83 3434 > > -- -------------------------------------------------------------- Please read the FAQ! <http://java.apache.org/faq/> To subscribe: [EMAIL PROTECTED] To unsubscribe: [EMAIL PROTECTED] Archives and Other: <http://java.apache.org/main/mail.html> Problems?: [EMAIL PROTECTED] -- -------------------------------------------------------------- Please read the FAQ! <http://java.apache.org/faq/> To subscribe: [EMAIL PROTECTED] To unsubscribe: [EMAIL PROTECTED] Archives and Other: <http://java.apache.org/main/mail.html> Problems?: [EMAIL PROTECTED]