----------------------------------------------------------------
BEFORE YOU POST, search the faq at <http://java.apache.org/faq/>
WHEN YOU POST, include all relevant version numbers, log files,
and configuration files.  Don't make us guess your problem!!!
----------------------------------------------------------------

Yes, you can set the max filesize via parameters to the constructor method for the 
MultipartRequest, however as he mentions in the article, the buffer size is only 
extendable via changing the source
code and recompiling, something I'm not interested in doing because I would have to do 
this for all future updates of the package, etc.

-- Joshua Slack

Jackson Ching wrote:

> ----------------------------------------------------------------
> BEFORE YOU POST, search the faq at <http://java.apache.org/faq/>
> WHEN YOU POST, include all relevant version numbers, log files,
> and configuration files.  Don't make us guess your problem!!!
> ----------------------------------------------------------------
>
> If i'm not mistaken, you can configure the COS MultipartRequest and set the max 
>filesize, the default is 1MB ... and also you have to increase the JVM buffer space 
>... though i forgot how already.
>
> # I am using the COS (com.oreilly.servlet) package to handle file uploads.  It
> # works great except if I upload certain files that have lines longer than
> # 100KB in them, it throws an exception.
> #
> # The Servlets.com FAQ had this to say:
> #
> # Question
> #       Why am I getting an ArrayIndexOutOfBoundsException when using
> # com.oreilly.servlet.MultipartRequest?
> #
> # Answer
> #       You most likely are using a server that supports Servlet API 2.0. In
> # these servers there's a bug in
> #       ServletInputStream's readLine(byte[] buf, int off, int len) method
> # where the "len" parameter is ignored,
> #       and as a result input lines that exceed the buf length will throw an
> # AIOOBE. The solution is to use a
> #       server that supports Servlet API 2.1 or later, or to change the
> # MultipartRequest read buffer size to be
> #       longer than any input line received. The current buffer set in
> # readAndSaveFile() is 100K.
> #
> # I am currently using Sun's JSDK2.0...  I am loathe to drop JServ in favor of
> # another servlet engine that supports JSDK2.1, but I must make it easy for
> # users to install on their own sites without passing out customized versions
> # of the COS package.
> #
> # Any suggestions?  Is this bug also in the servlets.jar version of the JSDK
> # that is passed out with JServ?
> #
> # Thanks for any help,
> #
> # Sincerely,
> #
> # -- Joshua Slack
> # www.obj-x.com
> #
> #
> #
> # --
> # --------------------------------------------------------------
> # Please read the FAQ! <http://java.apache.org/faq/>
> # To subscribe:        [EMAIL PROTECTED]
> # To unsubscribe:      [EMAIL PROTECTED]
> # Search Archives:
> # <http://www.mail-archive.com/java-apache-users%40list.working-dogs.com/>
> # Problems?:           [EMAIL PROTECTED]
>
> --
> --------------------------------------------------------------
> Please read the FAQ! <http://java.apache.org/faq/>
> To subscribe:        [EMAIL PROTECTED]
> To unsubscribe:      [EMAIL PROTECTED]
> Search Archives:
> <http://www.mail-archive.com/java-apache-users%40list.working-dogs.com/>
> Problems?:           [EMAIL PROTECTED]



--
--------------------------------------------------------------
Please read the FAQ! <http://java.apache.org/faq/>
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Search Archives: 
<http://www.mail-archive.com/java-apache-users%40list.working-dogs.com/>
Problems?:           [EMAIL PROTECTED]

Reply via email to