1) 100 to 199 (Informational)
This range include the Informational codes about the kind of action client should use or respond
2) 200 to 299 (Request success)
This range include the success codes that indicates the success of the request
3) 300 to 399 (Request File is moved)
This range include the code to indicate that the particular document/file location is moved to another location
4) 400 to 499 (Client side Error)
This range codes indicates the error generated by the client side
5) 500 to 599 (Server side Error)
This range codes indicates the error generated by the server side
How to use
To set the status code one should use the predefined constants for the respective status code using the method : response.setStatus(response.SC_ABC_XYZ);
Status Code
|
Purpose
|
100-199
|
Informational
|
200-299
|
Request
was successful
|
300-399
|
Request
file has moved.
|
400-499
|
Client
error
|
500-599
|
Server
error.
|
Some Status Code with their Short Meaning
100 : Continue
200 : OK
202 : Accepted
204 : No Content
205 : Reset Content
301 : Moved Permanentely
302 : Found
303 : See Other
304 : Not Modified
400 : Bad Request
: Bad syntax of the request
401 : Unauthorized
: client tries to access the password protected resource,
403 : Forbidden
: server refuse to supply the requested resource
404 : Not Found
: when the requested resource is not found on the server.
405 : Method Not Allowed
: put,trace,delete,options if server doesnt support the method requested.
415 : Unsupported Media Type
: request contain the document that the server doesnt know how to handle.
417 : Expectation Failed
: request ask to process some document with 100 code in header, in this request response
server can respond with code 417
500 : Internal Server Error
: When Server is Confused.
501 : Not Implemented
: doesnt support the functionality to fullfill the request.
503 : Service Unavailable
: When server is not able to fullfill the request service. because of overloading or maintenance or etc
No comments:
Post a Comment