Look closely at the exception and I think you'll see that it happens before your page event methods are called while tapestry is decoding the file.
This appears to happen in the MultipartServletRequestFilter. I don't have a good solution for intercepting errors at that level off the top of my head. Josh On Sun, Jul 13, 2008 at 5:24 PM, AngeloChen960 <[EMAIL PROTECTED]> wrote: > > Hi, > > I have code like following to upload file, it should be able to handle > exceptions like UploadMessage.writeFailure, but it does not catch exception > listed at end of the message, any idea why? Thanks, > > Angelo > > > @Property > private UploadedFile _file; > > > @CommitAfter > Object onSuccess() { > > String fname = myServices.upload_dir() + _file.getFileName(); > > File copied = new File(fname); > > try { > _file.write(copied); > > return backLink; > > } catch (Exception e) { > > System.out.println(e.getMessage()); > return uploadError; > > } > > } > > > > Jul 13, 2008 5:06:36 PM org.apache.catalina.core.StandardWrapperValve > invoke > SEVERE: Servlet.service() for servlet default threw exception > java.lang.RuntimeException: Unable to decode multipart encoded request. > at > > org.apache.tapestry5.upload.internal.services.MultipartDecoderImpl.parseRequest(MultipartDecoderImpl.java:100) > > > > -- > View this message in context: > http://www.nabble.com/T5%3A-how-to-catch-Unable-to-decode-multipart-encoded-request-exception-in-Tapestry-Upload--tp18435577p18435577.html > Sent from the Tapestry - User mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- -- TheDailyTube.com. Sign up and get the best new videos on the internet delivered fresh to your inbox.