response code : Java Glossary

response code
Everyone is familiar with error 404 not found. The codes are arranged in bands:
HTTP (Hypertext Transfer Protocol) Response Codes
Code HttpURLConnection
Constant
Meaning Notes
200 HTTP_OK OK This is the most common code when all went well.
201 HTTP_CREATED Created
202 HTTP_ACCEPTED Accepted
203 HTTP_NOT_AUTHORITATIVE Non-Authoritative Information
204 HTTP_NO_CONTENT No Content
205 HTTP_RESET Reset Content
206 HTTP_PARTIAL Partial Content
300 HTTP_MULT_CHOICE Multiple Choices
301 HTTP_MOVED_PERM Moved Permanently This means the page has moved permanently. Please change your links since the old URL (Uniform Resource Locator) will probably soon stop working. The replacement relative URL is in the location field of the response header.
302 HTTP_MOVED_TEMP Temporary Redirect You should repeat the GET with the relative URL in the location field of the response header. You should not update your records with that redirected URL since it is valid only for this one use. You can usually ask your HTTP manager to follow such link chains for you transparently. You can thus for all practical purposes assume this code will never occur.
303 HTTP_SEE_OTHER See Other This usually means the page has changed from http:// to https:// or vice versa. Please update your links.
304 HTTP_NOT_MODIFIED Not Modified Not modified since last time you requested the page, presuming you still have the previous copy. Used in conjuction with If-Modified-Since in the request header.
305 HTTP_USE_PROXY Use Proxy
400 HTTP_BAD_REQUEST Bad Request
401 HTTP_UNAUTHORIZED Unauthorized This is the most common response when you have tried to access a page that requires logon first.
402 HTTP_PAYMENT_REQUIRED Payment Required
403 HTTP_FORBIDDEN ForbiddenYou get this if you are hitting a site with simultaneous probes.
404 HTTP_NOT_FOUND Not Found This is the most common code when the URL does not exist.
405 HTTP_BAD_METHOD Method Not Allowed
406 HTTP_NOT_ACCEPTABLE Not Acceptable
407 HTTP_PROXY_AUTH Proxy Authentication Required
408 HTTP_CLIENT_TIMEOUT Request Time-Out
409 HTTP_CONFLICT Conflict
410 HTTP_GONE Gone
411 HTTP_LENGTH_REQUIRED Length Required
412 HTTP_PRECON_FAILED Precondition Failed
413 HTTP_ENTITY_TOO_LARGE Request Entity Too Large
414 HTTP_REQ_TOO_LONG Request-URI Too Large
415 HTTP_UNSUPPORTED_TYPE Unsupported Media Type
500 HTTP_SERVER_ERROR Internal Server Error
500 HTTP_INTERNAL_ERROR Internal Server Error
501 HTTP_NOT_IMPLEMENTED Not Implemented
502 HTTP_BAD_GATEWAY Bad Gateway
503 HTTP_UNAVAILABLE Service Unavailable
504 HTTP_GATEWAY_TIMEOUT Gateway Timeout
505 HTTP_VERSION HTTP Version Not Supported
There are other HTTP errors in the series documented as part of HttpURLConnection and HttpServletResponse.
Oracle’s Javadoc on getResponseMessage class : available:
Oracle’s Javadoc on HTTP response codes : available:
Server HTTP response codes : available:

CMP homejump to top You can get the freshest copy of this page from: or possibly from your local J: drive (Java virtual drive/mindprod.com website mirror)
http://mindprod.com/jgloss/responsecode.html J:\mindprod\jgloss\responsecode.html
logofeedback Please email your feedback for publication, letters to the editor, errors, omissions, typos, formatting errors, ambiguities, unclear wording, broken/redirected link reports, suggestions to improve this page or comments to Roedy Green : feedback email If you want your message kept confidential, not considered for posting, please explicitly specify that.
mindprod.com IP:[65.110.21.43]
view BlogYour face IP:[38.107.179.212]
You are visitor number 11,442.