at first thank you . Yow kown that the FormFile has a method named setFileName() , but how and when to use it ?
and any else approach to rename the uploadfile in the code ? Laurie Harper wrote: > > MavenMan wrote: >> I want to rename upload file in my action .I code : >> >> FormFile file=form.getUserphoto(); >> file.setFileName(String.valueOf(date.getTime())); >> but error is :javax.servlet.ServletException: The setFileName() method is >> not supported. >> >> what can I do ? >> thanks in advance ! > > The file in the form is a temporary file, so if you need it to remain on > disk beyond the lifetime of the request you'll need to manually copy its > content into a new file in an appropriate place. > > L. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/how-rename-the-upload-file-in-struts1---tf4675357.html#a13358179 Sent from the Struts - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]