Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes Tomcat and the fly likes how to override 403 error page Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "how to override 403 error page" Watch "how to override 403 error page" New topic
Author

how to override 403 error page

Ray Lim
Greenhorn

Joined: Jan 10, 2002
Posts: 15
The default page contains a big blue header with the text below. I would like to know how to change this or any of the default error pages. Thanks
Apache Tomcat/4.0.1 - HTTP Status 403 - Access to the requested resource has been denied
type Status report
message Access to the requested resource has been denied
description Access to the specified resource (Access to the requested resource has been denied) has been forbidden.
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16022
    
  20

When the error page comes from Apache, you can replace it using an alternate error page specified in the Apache config file (httpd.conf) -- see the ErrorDocument directive.
I'd expect the web.xml file to have equivalent options on the Tomcat side, but I'd have to read the spec.


Customer surveys are for companies who didn't pay proper attention to begin with.
Elaine Prata
Greenhorn

Joined: Jul 16, 2003
Posts: 1
I'm using the Tomcat 4.1.24 only... I'm not using the Apache with Tomcat. So, how can I change this error page ( I'm not sure that it is a page ):
"Access to the requested resource has been denied"
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: how to override 403 error page