Request exceeded allowed size limit! Max size allowed is: 2,097,152

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Request exceeded allowed size limit! Max size allowed is: 2,097,152

Emi Lu
Hello,

Tried to upload file, and always got the following errors:

Request exceeded allowed size limit! Max size allowed is: 2,097,152 but
request was: 2,463,633!



May I know where I missed the steps please?

struts.xml
<struts>
    <constant name="struts.multipart.maxSize" value="90000000" />
    <package name="Privileged" namespace="/Action"
extends="security-fix" strict-method-invocation="false">
    ....

<action name="*ProcessActionUploadPdf"  method="{1}"
class="ProcessActionUploadPdf">
          <interceptor-ref name="basicStack"/>
          <interceptor-ref name="fileUpload">
             <param name="maximumSize">90000000</param>
          </interceptor-ref>

          <result name="view_pdf" type="stream">
              <param name="contentType">application/pdf</param>
              <param name="inputName">fileInputStream</param>
              <param
name="contentDisposition">attachment;filename="${filename}"</param>
              <param name="bufferSize">1024</param>
           </result>
           .....

tomcat7 server.xml:
<Connector connectionTimeout="20000" port="8080" protocol="HTTP/1.1"
                redirectPort="8443"
                maxpostsize="90000000">

Thanks a lot!


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Request exceeded allowed size limit! Max size allowed is: 2,097,152

adam brin
what version of struts are you using?  There was a bug for a version that
limited the size, I believe.

On Mon, Mar 13, 2017 at 7:57 AM, Emi <[hidden email]> wrote:

> Hello,
>
> Tried to upload file, and always got the following errors:
>
> Request exceeded allowed size limit! Max size allowed is: 2,097,152 but
> request was: 2,463,633!
>
>
>
> May I know where I missed the steps please?
>
> struts.xml
> <struts>
>    <constant name="struts.multipart.maxSize" value="90000000" />
>    <package name="Privileged" namespace="/Action" extends="security-fix"
> strict-method-invocation="false">
>    ....
>
> <action name="*ProcessActionUploadPdf"  method="{1}"
> class="ProcessActionUploadPdf">
>          <interceptor-ref name="basicStack"/>
>          <interceptor-ref name="fileUpload">
>             <param name="maximumSize">90000000</param>
>          </interceptor-ref>
>
>          <result name="view_pdf" type="stream">
>              <param name="contentType">application/pdf</param>
>              <param name="inputName">fileInputStream</param>
>              <param name="contentDisposition">atta
> chment;filename="${filename}"</param>
>              <param name="bufferSize">1024</param>
>           </result>
>           .....
>
> tomcat7 server.xml:
> <Connector connectionTimeout="20000" port="8080" protocol="HTTP/1.1"
>                redirectPort="8443"
>                maxpostsize="90000000">
>
> Thanks a lot!
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>


--
_________________________________________________________
Adam Brin
Director of Technology, Digital Antiquity
480.965.1278
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Request exceeded allowed size limit! Max size allowed is: 2,097,152

Johannes Geppert
In reply to this post by Emi Lu
I'm not sure, but I think the tomcat configuration is case sensitive.
Can you please try "maxPostSize" instead of "maxpostsize" in your connector
config?

Best Regards

Johannes

#################################################
web: http://www.jgeppert.com
twitter: http://twitter.com/jogep


2017-03-13 15:57 GMT+01:00 Emi <[hidden email]>:

> Hello,
>
> Tried to upload file, and always got the following errors:
>
> Request exceeded allowed size limit! Max size allowed is: 2,097,152 but
> request was: 2,463,633!
>
>
>
> May I know where I missed the steps please?
>
> struts.xml
> <struts>
>    <constant name="struts.multipart.maxSize" value="90000000" />
>    <package name="Privileged" namespace="/Action" extends="security-fix"
> strict-method-invocation="false">
>    ....
>
> <action name="*ProcessActionUploadPdf"  method="{1}"
> class="ProcessActionUploadPdf">
>          <interceptor-ref name="basicStack"/>
>          <interceptor-ref name="fileUpload">
>             <param name="maximumSize">90000000</param>
>          </interceptor-ref>
>
>          <result name="view_pdf" type="stream">
>              <param name="contentType">application/pdf</param>
>              <param name="inputName">fileInputStream</param>
>              <param name="contentDisposition">atta
> chment;filename="${filename}"</param>
>              <param name="bufferSize">1024</param>
>           </result>
>           .....
>
> tomcat7 server.xml:
> <Connector connectionTimeout="20000" port="8080" protocol="HTTP/1.1"
>                redirectPort="8443"
>                maxpostsize="90000000">
>
> Thanks a lot!
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Request exceeded allowed size limit! Max size allowed is: 2,097,152

Emi Lu
> I'm not sure, but I think the tomcat configuration is case sensitive.
> Can you please try "maxPostSize" instead of "maxpostsize" in your connector
> config?
Have updated to the following and succeeded this time (struts2: most
recent version).

(1) server.xml
      Change to maxPostSize
(2) struts.xml
        <interceptor-ref name="defaultStack">
        </interceptor-ref>
        <constant name="struts.multipart.maxSize" value="90000000" />
Thanks a lot for the help!

>
>> struts.xml
>> <struts>
>>     <constant name="struts.multipart.maxSize" value="90000000" />
>>     <package name="Privileged" namespace="/Action" extends="security-fix"
>> strict-method-invocation="false">
>>     ....
>>
>> <action name="*ProcessActionUploadPdf"  method="{1}"
>> class="ProcessActionUploadPdf">
>>           <interceptor-ref name="basicStack"/>
>>           <interceptor-ref name="fileUpload">
>>              <param name="maximumSize">90000000</param>
>>           </interceptor-ref>
>>
>>           <result name="view_pdf" type="stream">
>>               <param name="contentType">application/pdf</param>
>>               <param name="inputName">fileInputStream</param>
>>               <param name="contentDisposition">atta
>> chment;filename="${filename}"</param>
>>               <param name="bufferSize">1024</param>
>>            </result>
>>            .....
>>
>> tomcat7 server.xml:
>> <Connector connectionTimeout="20000" port="8080" protocol="HTTP/1.1"
>>                 redirectPort="8443"
>>                 maxpostsize="90000000">
>>
>>


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Loading...