> after that, no matter what file I upload, I will catch the same exception,> > even if the uploaded file doesn't exceed the size limit. If you upload an empty file you get the same error with the same size reported? That doesn't make sense. Without more code it's going to be hard to debug. Can you provide a simple app that reproduces the problem? Or at minimum a page class and tml file that are causing the problem.
Josh On Sun, Nov 13, 2011 at 10:41 PM, Zhanpeng Fang <[email protected]> wrote: > Hi, > > I have a form with a upload component inside. And I have set the size limit > of uploaded file by codes like: > > configuration.add(UploadSymbols.REQUESTSIZE_MAX, "2097153"); > configuration.add(UploadSymbols.FILESIZE_MAX, "2097153"); > > then I upload a file that exceeds the limit, and catch exceptions like : > > Caused by: > org.apache.commons.fileupload.FileUploadBase$SizeLimitExceededException: > the request was rejected because its size (3507770) exceeds the configured > maximum (2097153) > at > org.apache.commons.fileupload.FileUploadBase$FileItemIteratorImpl.<init>(FileUploadBase.java:937) > at > org.apache.commons.fileupload.FileUploadBase.getItemIterator(FileUploadBase.java:331) > at > org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:351) > at > org.apache.commons.fileupload.servlet.ServletFileUpload.parseRequest(ServletFileUpload.java:126) > ... > > after that, no matter what file I upload, I will catch the same exception, > even if the uploaded file doesn't exceed the size limit. > > Please can somebody help and tell how to solve the problem above? Thanks. > > -- > Zhanpeng Fang 方展鹏 > Department of Computer Science & Technology,Tsinghua University > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
