Hi Rafael,
               I have something similar. You could stream the output of the jsp/servlet to the MimeBodyPart constructor, and then attach it to the mail.
 
<psuedo code>
 
   String l_servletUrl = <url of jsp or servlet>;
   URL l_serv = new URL(l_servletUrl);
   URLConenction l_conn = l_serv.openConnection();
   l_conn.setUseCaches(false);
   l_conn.setDoInput(true);
   l_conn.setDoOutput(true);
 
   ObjectOutputStream out = new ObjectOutputStream(l_conn.getOutputStream());
   out.writeObject(<any input params to the jsp or servlet>);
   out.writeObject(null);
   out.flush();
 
   then put this in the MimeBodyPart
 
   MimeBodyPart mbp  = new MimeBodyPart(l_conn.getInputStream());
 
</psuedo code>
 
HTH,
uthiresh
 
-----Original Message-----
From: A mailing list for discussion about Sun Microsystem's Java Servlet API Technology. [mailto:[EMAIL PROTECTED]]On Behalf Of Rafael Chiarinelli
Sent: Friday, January 24, 2003 12:27 AM
To: [EMAIL PROTECTED]
Subject: File Upload - Attachment Files

Hi my friends!!!

I'm developing a Webmail using servlet's and I can't get do a annex in a message. How can I do a upload in the Webmail?

Mean you give me a example???

Thanks!!

Rafael Chiarinelli



Busca Yahoo!
O melhor lugar para encontrar tudo o que você procura na Internet

Reply via email to