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
{
HttpServletResponse response )
throws ServletException, IOException
{
//
...
response.sendError( 403, "My Forbidden Message" );
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 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
Gary Venables
Engineer - IT and Networks
Roke Manor Research Ltd
Phone: +44 (0)1794 83 3512
Fax: +44 (0)1794 83 3434
