commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Craig McClanahan <>
Subject Re: [FileUpload] Question re Sample Code for MultipartStream class (what is OutputStream output for?)
Date Fri, 23 Jul 2004 18:02:36 GMT
On Fri, 23 Jul 2004 10:51:47 -0700, Thomas Joseph Olaes
<> wrote:
> Hello List,
> This is my first email post to the group.
> My question regarding the example code listed at the top of the
> MultipartStream class javadoc page: What is OutputStream output for? Is
> it for the "out" variable? I'm getting an error with my current code
> saying I have to initialize it... how do I do this? I was reading
> through the javadoc and supposedly readBodyData(OutputStream) is
> supposed to give the outputstream a value, but is there some kind of
> initialization I have to do before hand? Like point the OutputStream
> towards the "out" variable somehow?


One thing to keep in mind is that the sample code you are looking at
is designed to be run inside a servlet, not a JSP page.  I suspect
that, given what a JSP page does to the incoming request, this is
never going to work.  I would also suggest that you look at the
example on the "Package Documentation" page of the
org.apache.commons.fileupload Javadocs ... it shows how to use the
higher level APIs (DiskFileUpload) instead of the low level one you
are using.

With regards to your question, The "output" variable (of type
OutputStream) should be initialized to wherever you want to write the
content of the body part in question.


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

View raw message