This week's book giveaway is in the Agile and other Processes forum. We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line! See this thread for details.
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?;
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.