Forums Register Login

File Upload with Mail

+Pie Number of slices to send: Send
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.
+Pie Number of slices to send: Send
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.
Get meta with me! What pursues us is our own obsessions! But not this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 567 times.
Similar Threads
Servlet Not Responding: multipart/form data
Help in Multipart Request Urgent
sending a servlet parameters
Accessing a servlet from a Struts App running in another context.
uploading of file from one server to another using java or servlets
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 17:38:49.