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(BufferedOutputStream.java:72)
> at
> java.io.BufferedOutputStream.write(BufferedOutputStream.java:116)
> at MultipartRequest.readAndSaveFile(MultipartRequest.java:243)
> 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(HttpServerHandler.java:165)
> at
>
sun.servlet.http.HttpServerHandler.handleConnection(HttpServerHandler.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.html
> 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