users@glassfish.java.net

Re: I want to test Max Post Size and want to see "Post too large

From: <forums_at_java.net>
Date: Mon, 9 Jan 2012 23:34:52 -0600 (CST)

Dear Krishan,

In one of my web application, I need to limit the file size to 4MB. So I
configured maxPostSize in tomcat/conf/server.xml as below:

<Connector port="10080" maxHttpHeaderSize="8192"
 protocol="HTTP/1.1" URIEncoding="UTF-8"
               connectionTimeout="20000"
               redirectPort="8443" maxPostSize="4194304" />

Even after this change, I am able to upload the file more than 4MB. Tried the
same using textarea, but I am not getting any exception. Can you pls. help me
to resolve this issue. Very urgent for me.

I have set the response content type as follows in my servet:

response.setContentType("application/x-www-form-urlencoded");

Tomcat version is 6

Jdk is 1.6

IE is 7

Thanks & Regards

Anil


--
[Message sent by forum member 'anilmsc']
View Post: http://forums.java.net/node/788284