Hello Bernd, I was using filter, now I have switched to tobago-fileupload.jar as you suggested.
Now in my logs I'm getting: javax.faces.FacesException: org.apache.commons.fileupload.FileUploadBase$SizeLimitExceededException: the request was rejected because its size (258792409) exceeds the configured maximum (69206016) if I try to upload too large file. So, I guess there is no nice way to simply get validation error if the file size exceeds the one set in web.xml, am I right? I can just set some large hard limit and set desired limit on tc:validateFileItem? Or am I missing something? I can't use <error-page> for the exception, as I have to stay with the form in which I have tc:file tag. Thanks for help, michael On 17/03/07, Bernd Bohmann <[EMAIL PROTECTED]> wrote:
Hello Michael, how do you configure fileupload in tobago? I assume the Filter. The prefered option is tobago-fileupload.jar. This jar generates the error messages inside the faces lifecycle. The filter throws an exception outside the faces lifecycle. Both filter or jar have a hard limit (See configuration options in faq). With the validator you can configure some other validation after the file is downloaded. Regards Bernd Michał 'Gandalf' Stawicki wrote: > Hello, > > When I try to upload too large file, I simply get an exception. Am I > missing something? I would like to stay on the same page / get some > validation error. On my JSP I have: > > <tc:file > value="#{clientManagedBean.newOrderControler.attachmentsController.fileItem}" > > tip="Wprowadź nazwe pliku" > id="fileAddBrowse"> > > <tc:validateFileItem maxSize="10485760" /> > > </tc:file> > > regards, > michael >
-- [EMAIL PROTECTED] http://stawicki.jasliska.pl GG: 3691111 JID: [EMAIL PROTECTED]