Thanks, That would work. But still I'll have to have FormFile in to ActionForm which is not seriliazable. Giving me error
IOException while loading persisted sessions: java.io.WriteAbortedException: writing aborted; java.io.NotSerializableException: org.apache.commons.fileupload.DeferredFileOutputStream java.io.WriteAbortedException: writing aborted; java.io.NotSerializableException: org.apache.commons.fileupload.DeferredFileOutputStream at java.io.ObjectInputStream.readObject0(ObjectInputStream.java :1303) Kedar On 12/22/05, Laurie Harper <[EMAIL PROTECTED]> wrote: > > Kedar Panse wrote: > > Hello gurus, > > > > I want to use a wizard type of flow where in one screen there is File > > Upload. As this is wizard, i was using session scoped formbean with > one > > property formfile. But seems like formfile is not serializable. What > is > > proper way of handling this? > > Given that a file could be arbitrarily large, is doesn't really make > sense to store it in the session. I'd suggest saving it to temporary > disk and replacing the reference in the form bean with the path to the > temporary file. You can then reload the temp file when your wizard is > ready to deal with it. > > So, in your action when the file upload is received, stream it to a temp > file, set the form bean property for the uploaded file to null, and set > another property to the path to the temp file. The form bean should then > serialize without problem, and you can get at the file later when you > need to. > > L. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >