• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

File Upload with Mail

 
Ranch Hand
Posts: 213
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Here. Have a potato. I grew it in my armpit. And from my other armpit, this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic