Spring mvc,http Status, JQuery

Source: Internet
Author: User
Tags unsupported domain list log4j

first, look at the description of the 4xx error

"Reprint" http status 400,http 400,400 error

"Reference" status Code, Bad Request (§10.4.1)

4 request failed 4xx

The 4xx answer defines a scenario in which a request for a particular server response failed. The client should not retry the same request without changing the request. (for example, increase the appropriate authentication information). However, the same request may be successful if it is given to a different server.
4.1 Bad Request
The syntax error in the request. Reason-phrase should flag this detailed syntax error, such as "Missing Call-id header Field".
4.2 401 Unauthorized
The request requires user authentication. This response is generated by UAS and the registered server, when 407 (proxy authentication Required) is the proxy server.
4.3 402 Payment Required
reserved/later use
4.4 403 Forbidden
The service side supports this request, but refuses to execute the request. It is not necessary to increase the authentication information, and the request should not be retried.
4.5 404 Not Found
The server returns the final message: The user does not exist on the domain specified by the Request-uri. This response is also generated when Request-uri domain does not match the domain that received the request.
4.6 405 Method not allowed
The server supports methods in Request-line, but it is not allowed to apply this method to addresses in this request-uri.
The answer must include an Allow header field that contains a list of methods allowed for the specified address.
4.7 Not acceptable
the resource in the request only causes an error that the content cannot receive in the request outside of the accept header.
4.8 407 Proxy authentication Required
This return code and 401 (unauthorized) are class four, but the client should first pass the authentication on the proxy. For SIP authentication access, see sections 26 and 22.3.
This return code is used for application access to the communication gateway (for example, telephone gateways) and is seldom used for authentication by the called party.
4.9 408 Request Timeout
during a period of time, the server cannot produce an end response, for example, if it cannot determine the user's location in a timely manner. The client can then retry the request without changing the content of the request at a later time.
4.10 410 Gone
the requested resource does not already exist on this server and does not know where to forward the request. This problem will be permanent. If the server does not know, or is not easily detected, whether the resource disappears temporarily or permanently, then a 404 (not Found) should be returned.
4.11 413 Request entity is too large.
The server refused to process the request because the entity of the request exceeded the size that the server wanted or could handle. This server should close the connection to prevent the client from re-sending the request.
if the situation is temporary, then the server should include a Retry-after header field to indicate that this is a temporary failure, and the client can try again over time.
4.12 414 Request-uri Too Long
the server rejects this request because Request-uri exceeds the length that the server can handle.
4.13 415 Unsupported Media Type
The server is not supported due to the format of the requested message body, so it refuses to process this request. This server must return a accept,accpet-encoding, or accept-language header domain list, based on the type of failure of the content. UAC handles this response based on the method defined in section 8.1.3.5.
4.14 416 Unsupported URI Scheme
the server terminated processing this request because it does not support the URI scheme in Request-uri. The client handles this reply reference 8.1.3.5.
4.15 Bad Extension
The server does not know the protocol extension indicated in Proxy-require (20.29) or Require (20.32) header fields in the request. The server must list the unsupported extensions in the unsupported header domain. UAC handles this response see 8.1.3.5
4.16 421Extension Required
UAS requires a specific extension to handle this request, but the extension is not listed in the requested Supported header field. An answer with this answer code must contain an require header field that lists the required extensions.
UAS should not use this response unless it really does not provide a valid service to the client. Conversely, if the required extensions are not listed in the support header domain, the server should be processed based on the baseline SIP-compliant methods and the extensions supported by the client.
4.17 423 Interval Too Brief
The server rejected the request because the resource refresh time (or validity time) set in the request was too short. This response can be used to register the server to reject registration requests that have a short validity period for the contact header domain. The usage of this answer and the associated Min-expires header fields are described and explained in the 10.2.8,10.3,20.23 section.
4.18 480 temporarily unavailable
the request successfully arrives at the called Party's terminal system, but the called Party is currently unavailable (for example, no login, or login but the status is not able to communicate, or there is a "do Not Disturb" tag). The answer should mark a suitable retry-after in the time of the re-send. This user is also likely to be valid elsewhere (not known in this server). Reason-phrase (reason) should be prompted for more detailed reasons why the called party is temporarily unavailable. This value should be set by UA. The Status Code 486 (Busy here) can be used to more precisely represent the specific cause of this request failure.
This status code can also be returned by the forwarding service or proxy server, as they find that the Request-uri specified user exists, but there is no appropriate current forwarding address for the user.
4.19 481 call/transaction Does not Exist
This state indicates that the UAS received the request but did not match the existing conversation or transaction.
4.20 482 Loop detected
a loop was detected by the server (16.3/4)
4.21 483 Too many Hops
the server received a request containing the Max-forwards (20.22) header domain is 0
4.22 484 Address Incomplete
The server received a request and its request-uri is incomplete. There should be an additional information description in the reason phrase. This status code can overlap with dial-up. In and dial-up overlaps, the client does not know the length of the dial string. It sends a string that increments the length and prompts the user to enter more strings until the 484 (Address incomplete) answer appears.
4.23 485 ambiguous
The Request-uri is not clear. The answer can include a possible explicit address list in the Contact header field. This list of hints is a compromise for users or organizations in terms of security and privacy. It must be possible for the configuration to decide whether to replace this answer with 404 (NotFound), or to disallow the use of a possible selection list for ambiguous addresses.
An example of a response to a request with Request-uri:
SIP: [email protected]:
sip/2.0 485 ambiguous
Contact:carol Lee
contact:ping Lee
Contact:lee m.foote
part of the email and voice mail system provides this functionality. This status code differs from the 3XX status code: For 300来, it is assumed that the same person or service has different address choices. Therefore, for 3xx, automatic selection of the system or continuous search is effective, but for 485 (ambiguous) response, must be user intervention.
4.24 486 Busy here
When the called party 's terminal system is successfully contacted, but the called party is currently unable to answer the call on the terminal system, the answer should be returned to the caller at a more appropriate time to retry in the Retry-after header domain. This user may be available elsewhere, such as a phone-mail system, and so on. If we know that no other terminal system can answer this call, then we should return a status code of (Busy Everywhere).
4.25 487 Request Terminated
the request was terminated by bye or cancel. This response will never reply to the cancel request itself.
4.26 488 not acceptable here
This response and 606 (not acceptable) have the same meaning, but only the specific resources indicated by Request-uri are unacceptable, and requests from other places may be acceptable.
The body of the message containing the media compatibility description can appear in the answer and be normalized according to the Accept header field in the Invite request (if there is no Accept header field, then APPLICATION/SDP). This response is like the message body that answers the options request (OK).
4.27 491 Request Pending
in the same conversation, the request received by UAS has a dependent request being processed. 14.2 Describes how such a situation should be resolved.
4.28 493 undecipherable
The UAS received a request that contained an encrypted mime and did not know or provided the appropriate decryption key. This response can contain a single package containing the appropriate public key, which is used to encrypt the packet in the UAS communication.

HTTP status 400,http 400,400 error

Two, Spring MVC appears: HTTP status, the request sent by the client was syntactically incorrect.

first, 400 is a syntax error in the request.

So, what are the syntax of the request?

The grammatical errors encountered are:

The name of the form submission has an inconsistent type of parameter for the server (Controller in Spring MVC) (how inconsistent?). Just as the server would have accepted an integer (int), but the client passed a floating-point number (double,float)).

What about the parameters of the service that cannot be predicted by a 400 syntax error?

if we were using spring MVC as the server side, we might define a bean to bind the parameters from the foreground (I think as long as anyone who has used spring MVC would do it), can we enter the possible values through the name of the form form, To predict the type of the corresponding field in the bean (can I try it)?

Summary, Spring MVC has a 400 syntax error, the client should be looking for the value to be passed and the controller corresponding to the type of parameter is consistent, and Spring MVC background is not error, If log4j is used, the log can be set to the debug level

Log4j.rootlogger = DEBUG

Examples are as follows:

Field error in object ' article ' on field ' type ': Rejected value [11.0]; codes [Typemismatch.article.type,typemismatch.type,typemismatch.java.lang.integer,typemismatch]; arguments [Org.springframework.context.support.DefaultMessageSourceResolvable:codes [Article.type,type]; arguments []; Default message [type]]; Default message [Failed to convert property value of type ' java.lang.String ' to required type ' Int. ' for property ' type '; n ested exception is java.lang.NumberFormatException:For input string: "11.0"]2015-04-28 21:42:23 DEBUG Org.springframework.web.servlet.handler.AbstractHandlerExceptionResolver.resolveException ( abstracthandlerexceptionresolver.java:134)-Resolving exception from handler [public java.lang.Object Org.jast.mybatis.cms.controller.ArticleController.add (org.jast.mybatis.cms.entity.Article)]: Org.springframework.validation.bindexception:org.springframework.validation.beanpropertybindingresult:1 Errorsfield error in object ' article ' on field ' type ': Rejected value [11.0]; codes [Typemismatch.article.type,typemismatch.type,typemismatch.java.lang.integer,typemismatch]; arguments [Org.springframework.context.support.DefaultMessageSourceResolvable:codes [Article.type,type]; arguments []; Default message [type]]; Default message [Failed to convert property value of type ' java.lang.String ' to required type ' Int. ' for property ' type '; n ested exception is java.lang.NumberFormatException:For input string: "11.0"]2015-04-28 21:42:23 DEBUG Org.springframework.web.servlet.handler.AbstractHandlerExceptionResolver.resolveException ( abstracthandlerexceptionresolver.java:134)-Resolving exception from handler [public java.lang.Object Org.jast.mybatis.cms.controller.ArticleController.add (org.jast.mybatis.cms.entity.Article)]: Org.springframework.validation.bindexception:org.springframework.validation.beanpropertybindingresult:1 Errorsfield error in object ' article ' on field ' type ': Rejected value [11.0]; codes [Typemismatch.article.type,typemismatch.type,typEmismatch.java.lang.integer,typemismatch]; arguments [Org.springframework.context.support.DefaultMessageSourceResolvable:codes [Article.type,type]; arguments []; Default message [type]]; Default message [Failed to convert property value of type ' java.lang.String ' to required type ' Int. ' for property ' type '; n ested exception is java.lang.NumberFormatException:For input string: "11.0"]




Spring mvc,http Status, JQuery

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.