The error disappeared when i got the (i assume updated)
copy of the MultipartRequest class from
www.servlets.com. I was getting the error with the
version of that class from o\'reilly\'s first edition of
servlet programming.

Quoting Jason Hunter <[EMAIL PROTECTED]>:

> The \"Bad file descriptor\" exception seems to imply
there was a problem
> writing the data to disk, specifically that the handle
to the file (its
> descriptor) appears bad.  I\'ve never seen this msg
before, but my first
> thoughts are that perhaps the file name is somehow odd
and causing an
> error, or the file system is special (like NFS) and
there\'s an issue
> there, or something like that.
>
> -jh-
>
> --
> http://www.servlets.com
>
> Matt He wrote:
> >
> > If you didnot change the example servlet, it should
work for .html and
> .doc
> > files. I think you may need to check your system
configuration.
> >
> > The only problem I encountered was that when I used
ajp13 connector (with
> > apache and tomcat), it didnot work. Ajp12 is fine.
> >
> > matt
> >
> > ----- Original Message -----
> > From: \"Sohaila Roberts\"
<[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Tuesday, September 18, 2001 10:05 AM
> > Subject: o\'reilly\'s MultipartRequest class
> >
> > > Hi, when I run the example in servlet programming
for uploading files
> it
> > > works fine for .txt files but when i try to upload
.html or .doc files
> i
> > > get the following error
> > >
> > > java.io.IOException: Bad file descriptor
> > >         at
java.io.FileOutputStream.writeBytes(Native Method)
> > >         at
java.io.FileOutputStream.write(FileOutputStream.java:208
)
> > >         at
> > >
java.io.BufferedOutputStream.flushBuffer(BufferedOutputS
tream.java:72)
> > >         at
> > >
java.io.BufferedOutputStream.write(BufferedOutputStream.
java:116)
> > >         at
MultipartRequest.readAndSaveFile(MultipartRequest.java:2
43)
> > >         at
MultipartRequest.readNextPart(MultipartRequest.java:182)
> > >         at
MultipartRequest.readRequest(MultipartRequest.java:140)
> > >         at
MultipartRequest.(MultipartRequest.java:48)
> > >         at
FileUploadServlet.doPost(FileUploadServlet.java:15)
> > >         at
javax.servlet.http.HttpServlet.service(HttpServlet.java:
521)
> > >         at
javax.servlet.http.HttpServlet.service(HttpServlet.java:
588)
> > >         at
> > >
> >
>
sun.servlet.http.HttpServerHandler.sendResponse(HttpServ
erHandler.java:165)
> > >         at
> > >
> >
>
sun.servlet.http.HttpServerHandler.handleConnection(Http
ServerHandler.java:1
> > 21)
> > >         at
> > >
sun.servlet.http.HttpServerHandler.run(HttpServerHandler
.java:90)
> > >         at java.lang.Thread.run(Thread.java:475)
> > >
> > >
> > > does this error imply I can only upload .txt
files? if not what does it
> > > mean? if the example is suppose to only upload
.txt files can anyone
> > > direct me to how I can make it upload any files,
especially .sdw .doc
> and
> > > .wpd
> > >
> > > Thanks
> > > sohaila
> > >
> > >
> >
>
________________________________________________________
___________________
> > > To unsubscribe, send email to
[EMAIL PROTECTED] and include in the
> > body
> > > of the message \"signoff SERVLET-INTEREST\".
> > >
> > > Archives:
http://archives.java.sun.com/archives/servlet-interest.h
tml
> > > Resources:
http://java.sun.com/products/servlet/external-resources.
html
> > > LISTSERV Help:
http://www.lsoft.com/manuals/user/user.html
> >
> >
>
________________________________________________________
___________________
> > To unsubscribe, send email to [EMAIL PROTECTED]
and include in the
> body
> > of the message \"signoff SERVLET-INTEREST\".
> >
> > Archives:
http://archives.java.sun.com/archives/servlet-interest.h
tml
> > Resources:
http://java.sun.com/products/servlet/external-resources.
html
> > LISTSERV Help:
http://www.lsoft.com/manuals/user/user.html
>
>
________________________________________________________
___________________
> To unsubscribe, send email to [EMAIL PROTECTED]
and include in the body
> of the message \"signoff SERVLET-INTEREST\".
>
> Archives:
http://archives.java.sun.com/archives/servlet-interest.h
tml
> Resources:
http://java.sun.com/products/servlet/external-resources.
html
> LISTSERV Help:
http://www.lsoft.com/manuals/user/user.html
>

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to