• Post Reply Bookmark Topic Watch Topic
  • New Topic

File Upload with Mail

 
Yogendra Joshi
Ranch Hand
Posts: 213
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Friends ,

I want to make a Defect Management Tool wherein the client would be provided with a JSP to browse the erroneous file and click on Upload button.

The moment upload is clicked , It would goto a servlet which according to my understanding would have encoding type as Multipart-request and then parse the file.

The catch is , i want the file coming from jsp i.e from the client to be sent as an email attachment to the email specified in Deplyoment Descriptor as a context-param.

What is the best way to go about it.

According to me i would need

1) A Simple JSP with a form and input tag as file and encoding set to multipart

2) A controller servlet which would take the details from jsp.
3) JavaMail API which would be used for sending mails.

I require suggestions from you'll as to how i should make this success and where i should be careful.

Thanks and Regards ,

Yogendra N Joshi.
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There's no reason why this shouldn't work. You can find a few hints on how to do the file upload in the FileUpload page, and some useful links about JavaMail in the J2EE FAQ.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!