java - Multipart Config max file size not working in Tomcat 8 -


i have post api consumer multipart/form-data data.

@post @consumes(mediatype.multipart_form_data) public response postevent(@headerparam("id") string id,          @headerparam ("schema-version") string schemaversion,         byte[] serializedevents) 

i wanted limit maximum uploaded file size 64 kb.

so, made following change in webapps\<appname>\web-inf\web.xml

<multipart-config>   <max-file-size>65536</max-file-size>   <max-request-size>65536</max-request-size>   <file-size-threshold>0</file-size-threshold> </multipart-config> 

but not seem working. tried changing maxpostsize parameter of connector, though, know work case consuming body application/x-www-form-urlencoded.

i using tomcat 8.0 , jersey rest implementation. can please suggest going wrong here?

edit: here screenshot of request:

enter image description here

and, here part of web.xml:

<servlet>     <servlet-name>jersey-servlet</servlet-name>     <servlet-class>com.sun.jersey.spi.spring.container.servlet.springservlet</servlet-class>     <load-on-startup>1</load-on-startup>     <multipart-config>         <max-file-size>65536</max-file-size>         <max-request-size>65536</max-request-size>         <file-size-threshold>0</file-size-threshold>     </multipart-config> </servlet> 


Comments

Popular posts from this blog

yii2 - Yii 2 Running a Cron in the basic template -

asp.net - 'System.Web.HttpContext' does not contain a definition for 'GetOwinContext' Mystery -

mercurial graft feature, can it copy? -