HttpServletResponse's Senderror () method and common HttpServletResponse constant-level error codes

Source: Internet
Author: User
Tags http authentication

Reprint: http://hi.baidu.com/yanfei_nn/item/18ca79960fc021ab82d29533

Request the Senderror () method

Form: senderror (int errnum) Description: Used to send error messages to the client, which is very helpful for debugging programs. Common constant-level error codes are:
Sc_continue, the status code is 100, indicating that the client cannot connect.
Sc_swithing_protocols, the status code is 101, which indicates the protocol switchover that the server is stating in the header.
SC_OK, the status code is 200. Indicates that the request was successfully processed.
sc_created, the status code is 201, indicating that the request was processed successfully and a new resource was created on the server side.
sc_accepted, the status code is 202, indicating that the request is being processed but not yet complete.
Sc_non_authoritative_information, the status code is 203, indicating that the mate information expressed by the client is not from the server.
Sc_no_content, the status code is 204, indicating that the request was processed successfully, but no new information was returned.
Sc_reset_content, the status code is 205, indicating that the document view that caused the request to be sent should be reset.
Sc_partial_content, the status code is 206, indicating that the server has completed a GET request for the resource.
Sc_multi_choices, the status code is 300, indicating that the requested resource corresponding to a series of representations has a definite location.
sc_moved_permanently, the status code is 301, indicating that the requested resource has been moved to a new location, and that future reference points should use a new URL in the request.
sc_moved_temporarily, the status code is 302, indicating that the requested resource has been moved to a new location, and that future reference points still use the original URL in the request.
Sc_see_other, the status code is 303, which indicates that the requested response can be found in a different URL.
Sc_not_modified, the status code is 304, indicating that a conditional get operation discovers that the resource is available and has not been altered.
Sc_use_proxy, the status code is 305, indicating that the requested resource must be accessed through a proxy at a specific location.
Sc_bad_request, the status code is 400, which indicates that the client's request syntax is incorrect.
sc_unauthorized, the status code is 401, which indicates that HTTP authentication is requested.
sc_payment_required, the status code is 402, which represents a reservation for later use.
Sc_forbidden, the status code is 403, indicating that the server understands the customer's request but refuses to respond.
Sc_not_fand, the status code is 404, indicating that the requested resource is not available.
sc_method_not_allowed, the status code is 405, indicating that the method indicated in the request line does not allow the use of the resource indicated by the request URL.
Sc_not_accepttable, the status code is 406, indicating that the requested resource can only respond to the entity, and that the entity that conforms to the acceptable header domain sent by the request does contain unacceptable content.
sc_phoxy_authentication_required, the status code is 407, indicating that the client must first authenticate to the proxy.

HttpServletResponse's Senderror () method and common HttpServletResponse constant-level error codes

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.