You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Anil <an...@wonderschools.com> on 2001/05/29 09:16:50 UTC

Problems With multi part Request

I have this problem uploading files to the Server using a mulitpart Request
I tried this code to print the Request streams to the Output in my JSP Prog


 	    java.io.InputStream inst = request.getInputStream();
                int inm;
                while( (inm = inst.read())>-1){
                    out.write((char) inm);
                }


When I upload a txt file the Server receives the full file and prints it to
the response printwriter. But When I upload non ASCII data. Like
Images(gif/jpeg) the Stream just gets cut off just on the first character of
the uploaded file (All param like the filename and content type reaches but
any data after the file contents is discarded) . It seems that the Server is
not accepting these binary data.

The Code Worked well when I was using Tomcat standalone but now I am having
problems when it is running alongside apache.

Is there Some changes I have to do on Apache or Tomcat to start receiving
the uploaded Files



Kindly lead me to the light,

Warmest Regards,
Anil Oommen
anil@banyanlabs.com