Hi all,
I am using this package and i need the help badly to rename the file.Can
some one help me out
http://www.servlets.com/cos/

my code snippet is below.
<%
MultipartRequest multi=new MultipartRequest(request,".",5*1024*1024);
%>
How do i rename the file?

Thanks in advance
venkat

-----Original Message-----
From: A mailing list about Java Server Pages specification and reference
[mailto:[EMAIL PROTECTED] Behalf Of Venkat
Sent: Monday, March 10, 2003 11:25 AM
To: [EMAIL PROTECTED]
Subject: Re: file renaming using Multipart class.


Hi Jayant,
I want to do exacty what you said.
But where to append this?
The don't have constructor which takes filename as parameter.
So how can i append this?

Thanks in advance
venkat
-----Original Message-----
From: A mailing list about Java Server Pages specification and reference
[mailto:[EMAIL PROTECTED] Behalf Of Jayant Kataria
Sent: Monday, March 10, 2003 11:17 AM
To: [EMAIL PROTECTED]
Subject: Re: file renaming using Multipart class.


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

===========================================================================
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

Reply via email to