struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eva Sager <>
Subject RE: Problems with FormFile.getInputStream()
Date Thu, 06 Mar 2003 19:55:36 GMT
The only place I am using a fileIO stream is when I am adding the
InputStream to the MimeBodyPart...  so I am confused as to where I would
flush or close anything.  After more testing with a text file, it copies
everything after the first carriage return.  I have no idea what would be
causing it to ignore everything before the first carriage return...   Below
is the code:

String emailHost =
String emailFrom =

MimeBodyPart[] attachments = new MimeBodyPart[form.getAttachments().size()];
for(int i=0;i<form.getAttachments().size();i++)
  FormFile file = (FormFile)form.getAttachments().elementAt(i);
  attachments[i] = new MimeBodyPart(file.getInputStream());


-----Original Message-----
From: Rick Reumann []
Sent: Thursday, March 06, 2003 1:49 PM
To: Struts Users Mailing List
Subject: Re: Problems with FormFile.getInputStream()

On Thu, 6 Mar 2003 13:20:08 -0500 
Eva Sager <> wrote:

>   The file that ends up being attached is the correct file, it is just
>   that the top portion of it is cut off...

Probably a dumb question, but are you sure there are no spots where you
are missing flushing or closing some kind of fileIO stream?

Rick Reumann

To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message