aspose file tools*
The moose likes Servlets and the fly likes fileupload- default file name Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "fileupload- default file name" Watch "fileupload- default file name" New topic
Author

fileupload- default file name

N SRao
Greenhorn

Joined: Nov 13, 2001
Posts: 11
Hi I am using the com.oreilly.servlet.MultipartRequest for uploading the file, but I want to set the default file value in HTML, beacuse it is fixed file which I want to upload.How to do this ?I have tried like this but servlet is giving file as "null".
<INPUT TYPE=FILE NAME=file value="E:/mail/NewTest.class">
Please solve my problem.
Can any body help me?;
Mike Curwen
Ranch Hand

Joined: Feb 20, 2001
Posts: 3695

You need to send in the 'default' name as a hidden field.

Because the request object does not guarantee the order in which you can pull off the parameters, you'd need to upload the file to a temporary directory.

Then when you have the filename, use the Java file i/o classes to move/rename your file.
 
 
subject: fileupload- default file name