The server cannot or will not process the request due to something that is perceived to be a client

Posted sysocjs

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了The server cannot or will not process the request due to something that is perceived to be a client 相关的知识,希望对你有一定的参考价值。

使用SpringMVC,页面跳转时出现Bad Request:

信息如下:

Type Status Report

Message Required String parameter ‘description‘ is not present

Description The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing).

Message那里的‘description’是表单的一个参数,因为这个是第一个参数,所以只显示了description。使用springmvc上传文件功能时出现Bad Request,除了表单类型与@RequestParam POJO的属性类型不一致导致的原因外,还有一个可能性原因,就是没有配置MultipartResolver,因为springmvc默认情况下没有装配MultipartResolver,下面是配置MultipartResolver:

<!-- 配置上传文件 -->
    <bean id="multipartResolver" class="org.springframework.web.multipart.commons.CommonsMultipartResolver">
        <property name="maxUploadSize">
            <value>10485760</value>
        </property>
        <property name="defaultEncoding">
            <value>UTF-8</value>
        </property>
    </bean>

 

以上是关于The server cannot or will not process the request due to something that is perceived to be a client 的主要内容,如果未能解决你的问题,请参考以下文章

Warning: Hash history cannot PUSH the same path; a new entry will not be added to the history stack(

React Warning: Hash history cannot PUSH the same path; a new entry will not be added to the history

异常The channel is full or unexpected failure. The source will try again after 1000 ms

Cannot find or open the PDB file

The request included a message larger than the max message size the server will accept.

The request included a message larger than the max message size the server will accept.