Hi, How about prepending the userid with the name of the file specified by the user.
regards Rahul -----Original Message----- From: Venkat [mailto:[EMAIL PROTECTED] Sent: Monday, March 10, 2003 11:07 AM To: [EMAIL PROTECTED] Subject: file renaming using Multipart class. Hi all, I am tying to upload a file frin jsp page using bean MultiPartRequest class that come with oreilly examples. I am using the constructor which takes three parameters 1.request 2. dir 3. file size Itz working and it is storing in the dir given by me. But the file name is default file name which i selected from the browser. Here the problem is if different users sends the file with same name it is replacing the old file. So i want to upload the file selected by the user with the name specifed by me. How to do this? I checked the MultiPartClass constructors it has another constructor wich take as FileRenamePolicy interface but i didn't understand this. and how to create this interface using file as parameter? Can some one help me out how to do this? Thanks in advance venkat =========================================================================== To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant archives, FAQs and Forums on JSPs can be found at: http://java.sun.com/products/jsp http://archives.java.sun.com/jsp-interest.html http://forums.java.sun.com http://www.jspinsider.com ==========================================================================To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant archives, FAQs and Forums on JSPs can be found at: http://java.sun.com/products/jsp http://archives.java.sun.com/jsp-interest.html http://forums.java.sun.com http://www.jspinsider.com