uploading file from HTML page
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Ajay_Tejwani
Posted On:   Friday, May 18, 2001 01:27 PM

I have written following code to send a file as an attachement with the email:-

messageBodyPart = new MimeBodyPart();
DataSource source = new FileDataSource(filename);
messageBodyPart.setFileName(source.getName());
multipart.addBodyPart(messageBodyPart);
System.out.println("Check point 88");

message.setContent(multipart);
Transport.send(message);

I have to get "filename" from front end HTML page and if I give enctype = "multipart/formdata", it does not give the parameters using request.getParameters(). How can I solve this problem.

Re: uploading file from HTML page

Posted By:   John_Zukowski  
Posted On:   Saturday, May 19, 2001 11:30 AM

Uploading files is already covered in the servlets FAQ.
About | Sitemap | Contact