Hash: SHA1


On 1/15/16 1:02 AM, Rahul Singh wrote:
> Thanks for your guidelines, we have big hope from Apache Tomcat
> Team to solve this problem as this is show stopper for our
> application, we have also raise this question on various forum like
> stack overflow and other, but no relevant reply till now.

Why didn't you come to the Tomcat community first?

> Hope you understand my situation,
> please refer the below stackoverflow reference for more detail
> about this issue.
> http://stackoverflow.com/questions/34783438/dofilter-fails-to-get-any-
for more information:
> -No error are printed in tomcat logs. - how to configure "call 
> HttpServletRequest.getHeader("Content-Length") as a String and
> parse it yourself."

I don't have a test-case in front of my, but I'm fairly confident that
Tomcat allows file uploads of greater than 2GiB. I suspect the problem
is another component.

Are you using Servlet 3.0-based file upload, or are you allowing
Struts to handle the file-upload for you? If you use Servlet-3.0
file-upload, then you'll have code that deals with Multipart classes
and configuration in web.xml. If you are using Struts's file-upload,
then you'll mostly just be calling getFile or getInputStream or
however Struts 2 does things (I can't remember how it all works off
the top of my head).

The point is, if you are using Struts, then Tomcat will not touch the
request and Struts is handling the whole thing. If Struts is the
problem, you'll need to talk to the Struts team[1].

If you are using Servlet-3.0 file-upload, then Struts is just a red
herring and this is the right place to get your issue solved.

So far, you have posted some configuration for Struts and some JSP
tablib-filled code, plus some Java code for a Filter. You didn't say
where the Filter was in the filter chain (before or after Struts
filter).  You also mentioned that the form is actually posted using
XMLHttpRequest and not through a standard form, but you didn't explain
what component is doing that or how it actually works.

There isn't enough information here to make any sense of the
situation. Can you please address all of the questions I've posed
above and maybe we can then help you?

Are you sure the request is even made to the server in these cases?
What if the Javascript upload component is failing before it even starts

- -chris

[1] http://struts.apache.org/mail.html

> ________________________________________ From: Christopher Schultz 
> <ch...@christopherschultz.net> Sent: Thursday, January 14, 2016
> 8:43 PM To: Tomcat Users List Subject: Re: File size >= 2GB not
> uploaded in application [Tomcat 7.0.54 Struts: 2.3.24 JAVA: openJDK
> 1.7.79]
> André,
> On 1/14/16 5:02 AM, André Warnier (tomcat) wrote:
>> I have not followed this thread in details, but did you check
>> this :
>> http://tomcat.apache.org/tomcat-7.0-doc/config/http.html#Common_Attri
- --> maxPostSize
> +1
>> The maximum size in bytes of the POST which will be handled by
>> the container FORM URL parameter parsing. The limit can be
>> disabled by setting this attribute to a value less than zero. If
>> not specified, this attribute is set to 2097152 (2 megabytes).
>> Note that the FailedRequestFilter can be used to reject requests
>> that exceed this limit.
>> Note: the size above might relate to the *encoded* size of the 
>> file, as it is transmitted over the WWW (possibly encoded as
>> Base64 e.g.), which may mean that an original 1 MB file
>> translates to more than 1 MB bytes while being uploaded.
>> Note also : maybe "Struts" is setting this to some other default 
>> value..
>> Another question : did you check the Tomcat logs ?
> IIRC, Tomcat doesn't log anything in these cases. You have to use 
> the FailedRequestFilter to detect and report the condition. I 
> wouldn't use that Filter in productio, but it would be good as a 
> simple test to see if this is the error that is occurring.
> When Tomcat refuses to allow a file upload that it too large, it 
> simply does not parse the parameters, but the request continues to 
> process as usual (but the servlet doesn't end up getting any of
> the parameters). I'm surprised that Struts isn't getting the
> request in these cases.
> -chris
> ---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
> ---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/


To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to