You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Krish B <ww...@gmail.com> on 2006/08/19 15:52:23 UTC

maxPostSize in Tomcat

hi,

I am trying to use maxPostSize of tomcat in 5.5.15.

I edited the server.xml and added maxPostSize = 4MB

    <Connector
port="8080"               maxHttpHeaderSize="8192"
               maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
               enableLookups="false" redirectPort="8443" acceptCount="100"
               connectionTimeout="20000" disableUploadTimeout="true"
maxPostSize="4097152" />

I am able to post a file of size > 4 MB ( 16MB etc.. ). I was supposed to
get an error "Post too large" but dont seem to get it.

I think i have not configured it correctly...

Any pointers of how to get this right would be great.

Regards
KK

Re: maxPostSize in Tomcat

Posted by Mark Thomas <ma...@apache.org>.
Krish B wrote:
> Hi,
> 
> I tried doing the same using a FORM input
> 
> <input type="file" name="file-upload">
> This also works and i dont get an error for large file sizes more than the
> limit.
> 
> Regards
> KK
> 
> 
> On 8/19/06, Krish B <ww...@gmail.com> wrote:
>>
>>  Hi Mark,
>>
>> I restarted Tomcat after making the change & i am using port 8080.
>>
>> Regards
>> KK

Hmmm. Odd. It works for me. Try using the latest TC5.5.x in case there
has been a bug fix in this area (but I don't think there has been).

Mark

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: maxPostSize in Tomcat

Posted by Krish B <ww...@gmail.com>.
Hi,

I tried doing the same using a FORM input

<input type="file" name="file-upload">
This also works and i dont get an error for large file sizes more than the
limit.

Regards
KK


On 8/19/06, Krish B <ww...@gmail.com> wrote:
>
>  Hi Mark,
>
> I restarted Tomcat after making the change & i am using port 8080.
>
> Regards
> KK
>
>
>  On 8/19/06, Krish B <ww...@gmail.com> wrote:
> >
> >  hi Mark,
> >
> > Yes. I used apache httpclient to POST a large file to a servlet in
> > Tomcat. I expected tomcat to throw a error as size was cet to 4 MB.
> >
> > Any thoughts where i am wrong...
> >
> > Regards
> > KK
> >
> >
> >  On 8/19/06, Mark Thomas <ma...@apache.org> wrote:
> > >
> > > Krish B wrote:
> > > > hi,
> > > >
> > > > I am trying to use maxPostSize of tomcat in 5.5.15.
> > > >
> > > > I edited the server.xml and added maxPostSize = 4MB
> > > >
> > > >    <Connector
> > > > port="8080"               maxHttpHeaderSize="8192"
> > > >               maxThreads="150" minSpareThreads="25"
> > > maxSpareThreads="75"
> > > >               enableLookups="false" redirectPort="8443"
> > > acceptCount="100"
> > > >               connectionTimeout="20000" disableUploadTimeout="true"
> > > > maxPostSize="4097152" />
> > > >
> > > > I am able to post a file of size > 4 MB ( 16MB etc.. ). I was
> > > supposed to
> > > > get an error "Post too large" but dont seem to get it.
> > > >
> > > > I think i have not configured it correctly...
> > > Config looks fine.
> > > I have tested this and it works.
> > > I can't see any code changes since 5.5.15 that relate to this?
> > >
> > > > Any pointers of how to get this right would be great.
> > > Did you restart Tomcat after making the change?
> > > Are you connecting via port 8080?
> > >
> > > Mark
> > >
> > > ---------------------------------------------------------------------
> > > To start a new topic, e-mail: users@tomcat.apache.org
> > > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> > > For additional commands, e-mail: users-help@tomcat.apache.org
> > >
> > >
> >
>

Re: maxPostSize in Tomcat

Posted by Krish B <ww...@gmail.com>.
Hi Mark,

I restarted Tomcat after making the change & i am using port 8080.

Regards
KK


On 8/19/06, Krish B <ww...@gmail.com> wrote:
>
>  hi Mark,
>
> Yes. I used apache httpclient to POST a large file to a servlet in Tomcat.
> I expected tomcat to throw a error as size was cet to 4 MB.
>
> Any thoughts where i am wrong...
>
> Regards
> KK
>
>
>  On 8/19/06, Mark Thomas <ma...@apache.org> wrote:
> >
> > Krish B wrote:
> > > hi,
> > >
> > > I am trying to use maxPostSize of tomcat in 5.5.15.
> > >
> > > I edited the server.xml and added maxPostSize = 4MB
> > >
> > >    <Connector
> > > port="8080"               maxHttpHeaderSize="8192"
> > >               maxThreads="150" minSpareThreads="25"
> > maxSpareThreads="75"
> > >               enableLookups="false" redirectPort="8443"
> > acceptCount="100"
> > >               connectionTimeout="20000" disableUploadTimeout="true"
> > > maxPostSize="4097152" />
> > >
> > > I am able to post a file of size > 4 MB ( 16MB etc.. ). I was supposed
> > to
> > > get an error "Post too large" but dont seem to get it.
> > >
> > > I think i have not configured it correctly...
> > Config looks fine.
> > I have tested this and it works.
> > I can't see any code changes since 5.5.15 that relate to this?
> >
> > > Any pointers of how to get this right would be great.
> > Did you restart Tomcat after making the change?
> > Are you connecting via port 8080?
> >
> > Mark
> >
> > ---------------------------------------------------------------------
> > To start a new topic, e-mail: users@tomcat.apache.org
> > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> > For additional commands, e-mail: users-help@tomcat.apache.org
> >
> >
>

Re: maxPostSize in Tomcat

Posted by Krish B <ww...@gmail.com>.
hi Mark,

Yes. I used apache httpclient to POST a large file to a servlet in Tomcat. I
expected tomcat to throw a error as size was cet to 4 MB.

Any thoughts where i am wrong...

Regards
KK


On 8/19/06, Mark Thomas <ma...@apache.org> wrote:
>
> Krish B wrote:
> > hi,
> >
> > I am trying to use maxPostSize of tomcat in 5.5.15.
> >
> > I edited the server.xml and added maxPostSize = 4MB
> >
> >    <Connector
> > port="8080"               maxHttpHeaderSize="8192"
> >               maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
> >               enableLookups="false" redirectPort="8443"
> acceptCount="100"
> >               connectionTimeout="20000" disableUploadTimeout="true"
> > maxPostSize="4097152" />
> >
> > I am able to post a file of size > 4 MB ( 16MB etc.. ). I was supposed
> to
> > get an error "Post too large" but dont seem to get it.
> >
> > I think i have not configured it correctly...
> Config looks fine.
> I have tested this and it works.
> I can't see any code changes since 5.5.15 that relate to this?
>
> > Any pointers of how to get this right would be great.
> Did you restart Tomcat after making the change?
> Are you connecting via port 8080?
>
> Mark
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

Re: maxPostSize in Tomcat

Posted by Mark Thomas <ma...@apache.org>.
Krish B wrote:
> hi,
> 
> I am trying to use maxPostSize of tomcat in 5.5.15.
> 
> I edited the server.xml and added maxPostSize = 4MB
> 
>    <Connector
> port="8080"               maxHttpHeaderSize="8192"
>               maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
>               enableLookups="false" redirectPort="8443" acceptCount="100"
>               connectionTimeout="20000" disableUploadTimeout="true"
> maxPostSize="4097152" />
> 
> I am able to post a file of size > 4 MB ( 16MB etc.. ). I was supposed to
> get an error "Post too large" but dont seem to get it.
> 
> I think i have not configured it correctly...
Config looks fine.
I have tested this and it works.
I can't see any code changes since 5.5.15 that relate to this?

> Any pointers of how to get this right would be great.
Did you restart Tomcat after making the change?
Are you connecting via port 8080?

Mark

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org