Hey list, how's it going?

I must be missing something.  I am trying to redirect to a custom error
page whenever a 404 error occurs.  It ought to be easy, but I'm having
trouble.

I am using Apache and Tomcat on Linux for my JSP pages.  I don't know
all the version numbers, but I can get them if anyone needs to know.

I have edited the httpd.conf file, and used the ErrorDocument directive
as explained here:
http://httpd.apache.org/docs/mod/core.html#errordocument

I am able to get the redirection to occur if I use the full URL (i.e.
http://www.bogusdomain.com/error404.jsp) but I don't want to do that.
When it redirects, it is telling the client to request my error page,
and so the original URL they were trying to go to is lost to me, and
any querystring data as well.

So, I would like to use option (3) (on the web link shown above) and
that is to redirect to a local URL to handle the error.  I am hoping
that if I do that, then I can retain the original URL and querystring
information that the user has requested, and then I can handle it in my
custom error page.

I'm sure people have done this, and I don't know why I can't get it to
work.  Does anyone have any suggestions?  I greatly appreciate it.

A couple detailed questions about this:  When I use the ErrorDocument
directive to redirect to an external URL, I give it the full URL.  From
what I understand, if I want to redirect to a local URL, then I can
just give it a relative path, right?  For example, if my Error page is
http://www.bogusdomain.com/error404.jsp, then I should just be able to
use this line in the httpd.conf file, right:

ErrorDocument 404 error404.jsp

If so, then does anyone know why that doesn't work?  If not, then what
do I need to do?  Thanks!

Doug Cannon
Dentrix Dental Systems
http://www.dentrix.com


__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to