4

I'd like to send a 404 error, and re-direct to a more attractive Error page for the user on Google App Engine.

I've tried adding this to my web.xml, but it doesn't work

    <error-page>
    <error-code>404</error-code>
    <location>404.html</location>
    </error-page>

The only information I have discovered comes from the old Google group

https://groups.google.com/d/topic/google-appengine-java/3C-pY5ta2HQ/discussion

I'd like to send the proper 404 header for search engines, and I'd like to present a nicer Error message to the user. Jason's suggestion at the end would mean sending a 302 and not a 404 so I don't think that is ideal for search engines. Is that the only choice? Any help, views appreciated.

1

1 Answer 1

3

Custom 404 pages are not supported for URLs your app handles, because once the request is directed to your application, it's up to it to return the response to the user. If you want to render an attractive 404 page, you should have your app return that as its response to a request that generates a 404. How you do that - via an internal redirect (not an HTTP one!) - or other functionality is up to you.

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.