Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7990751
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T13:06:23+00:00 2026-06-04T13:06:23+00:00

I am developing a web application with Spring 3 and jquery and i am

  • 0

I am developing a web application with Spring 3 and jquery and i am using an ajax upload script to send files to the server (Tomcat 7.0.22). A file is posted to the server with a content-type of application/octet-stream
and the server parses it fine as a byte array. However although i have even explicitly set in the tomcat configuration the value of maxpostsize to 2097152, this setting appears to have no effect at all. For example i am able to upload files (locally) large enough (> 1 GB) to crash the server (out of memory). Here are the request headers from firebug:

Host    localhost:8080
User-Agent  Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0.1) Gecko/20100101 Firefox/7.0.1
Accept  text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language en-us,en;q=0.5
Accept-Encoding gzip, deflate
Accept-Charset  ISO-8859-1,utf-8;q=0.7,*;q=0.7
Connection  keep-alive
X-Requested-With    XMLHttpRequest
X-File-Name some-pdf.pdf
Content-Type    application/octet-stream
Referer http://localhost:8080/myapp/
Content-Length  9369597
Cookie  JSESSIONID=F237BA8176D158A297BAFA7F57A98A5F;
Pragma  no-cache
Cache-Control   no-cache

Here is the Tomcat’s connector config

 <Service name="Catalina">

<Connector port="8080" protocol="HTTP/1.1" 
           connectionTimeout="20000" 
           redirectPort="8443" 
           maxPostSize="2097152"/>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T13:06:25+00:00Added an answer on June 4, 2026 at 1:06 pm

    Although this is an old question:

    As can be seen in Request.java, maxPostSize is taken into account only for the “application/x-www-form-urlencoded” content type and is not affected by how the request is made (“normal” vs. xhr).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am developing a web application using Spring and Tomcat 7.0. When I test
I'm developing a web application using .net/c#/jQuery. I want to develop an AJAX function
We are developing a web application using Spring framework and Hibernate ORM. As far
I am developing a Java Web Application using JSF, Spring and Hibernate. I need
I am using spring 3.0.2 for developing a simple web based application like twitter.
I am developing a web application using Spring JS and Dojo Toolkit. In this
I'm developing a web application on Apache Tomcat 6 with Hibernate and Spring, I'm
I am developing my application using spring-web-mvc... Now at my Controller it returns like
I am developing a Spring (Java framework for server-side web-development)web application, which will respond
I'm developing bunch of relatively small Spring based java web-application. I'm mostly using annotations

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.