Return-Path: Mailing-List: contact tomcat-user-help@jakarta.apache.org; run by ezmlm Delivered-To: mailing list tomcat-user@jakarta.apache.org Received: (qmail 43597 invoked from network); 12 Dec 2000 17:07:04 -0000 Received: from unknown (HELO kiwi.previdenciasocial.gov.br) (200.244.136.154) by locus.apache.org with SMTP; 12 Dec 2000 17:07:04 -0000 Received: from wtrjo086.dataprev.gov.br ([10.0.134.9]) by kiwi.previdenciasocial.gov.br with Microsoft SMTPSVC(5.0.2195.1600); Tue, 12 Dec 2000 15:05:05 -0300 Received: by wtrjo086.dataprev.gov.br with Internet Mail Service (5.5.2650.21) id ; Tue, 12 Dec 2000 15:06:03 -0300 Message-ID: <4B813DAFDA55F14EA92BFABB590081A8D3DD25@wtrjo081> From: "Jose Euclides da Silva Junior - DIGR.O" To: tomcat-user@jakarta.apache.org, joe@laffeycomputer.com Subject: RES: can jsp handle multipart/form-data ? Date: Tue, 12 Dec 2000 15:05:39 -0300 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2650.21) Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-OriginalArrivalTime: 12 Dec 2000 18:05:05.0359 (UTC) FILETIME=[0E2C25F0:01C06466] X-Spam-Rating: locus.apache.org 1.6.2 0/1000/N Hi everybody and Joe! I am trying to use the oreilly's package for multipart/form-data = streams. But I didnt find any=20 method to deal with input text field which comes ( mixed ) with the = uploaded file from my form. Any hint? Best Regards, =20 Jos=E9 Euclides J=FAnior __________________________________ E-mail: jose.euclides@rj.previdenciasocial.gov.br javabrasil@usa.net=20 bl1link@usa.net http://euclides.8m.com > -----Mensagem original----- > De: Joe Laffey [SMTP:joe@laffeycomputer.com] > Enviada em: Ter=E7a-feira, 12 de Dezembro de 2000 14:09 > Para: tomcat-user@jakarta.apache.org > Assunto: Re: can jsp handle multipart/form-data ? >=20 > On Tue, 12 Dec 2000, John D. Smith wrote: >=20 > > I try to make a jsp page that handles a file upload. > > The problem i face is that i get a Internal Server Error from = apache > > when i submit
to a jsp = as > action. > > Sending the same to php / cgi works fine. > > Question is: Is my server(apache/tomcat) misconfigured or doesn't = jsp > > handle that kind of requests ? >=20 > Here's what I discovered about this issue: >=20 > I am using the multipart classes from Jason Hunter (with Java Servlet > Programming from O'Reilly... I am using the latest version from the > website.) The problem is that if you use a multi-part request, but = then do > not treat it as such (by reading the ServletInputStream) then you = will get > the INternal Error. I found that the Multipart classes do not read = the > input stream if the file is too large (i.e. the check for the larger = file > is done before the reading of the entire stream). This is a good idea = in > general, but leads to the error. I am working on some enhancements to = the > multipart classes that fix this. I have a working version now, but it = is > not too generic . (i.e. it has been hacked quickly to work with my > project.) I can share this... If you are insterested let me know. >=20 > Joe Laffey > LAFFEY Computer Imaging > St. Louis, MO > ------------------------- > With no walls or fences on the Internet, who needs Windows or Gates? > ---------------------------------------------------------------------