File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes Error 404 and 405 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Error 404 and 405" Watch "Error 404 and 405" New topic

Error 404 and 405

venu venkata vara prasad

Joined: Jun 25, 2008
Posts: 3
what is 404 and 405 error indicates. how we can rectify these . please tell me about this.

Ben Souther

Joined: Dec 11, 2004
Posts: 13410

These are HTTP status codes and are not servlet specific.


10.4.5 404 Not Found

The server has not found anything matching the Request-URI. No indication is given of whether the condition is temporary or permanent. The 410 (Gone) status code SHOULD be used if the server knows, through some internally configurable mechanism, that an old resource is permanently unavailable and has no forwarding address. This status code is commonly used when the server does not wish to reveal exactly why the request has been refused, or when no other response is applicable.

10.4.6 405 Method Not Allowed

The method specified in the Request-Line is not allowed for the resource identified by the Request-URI. The response MUST include an Allow header containing a list of valid methods for the requested resource.

"How to rectify" depends on what's causing the error.
A 404 error could be caused by a misconfiguration at the server level, a malformed hyperlink, a page that has been moved but a link that has not been updated to point to the new location, etc...

If you're having these problems, and want help with them, you'll need to be very specific about what your app is doing when they occur. Otherwise, the best we can do is make wild guesses.
[ June 28, 2008: Message edited by: Ben Souther ]

Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
I agree. Here's the link:
subject: Error 404 and 405
It's not a secret anymore!