commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From antoine.robert-stagia...@akeryards.com
Subject Problem using commons-fileupload.jar
Date Thu, 08 Jun 2006 08:57:40 GMT



Hello,

I'm using fileupload, and have this exception :

org.apache.commons.fileupload.FileUploadException: Processing of multipart/form-data request
failed. Stream ended unexpectedly

This is very strange since it works well on my own computer and this exception is catched
when I run my program on an other server.

I don't know wether this information can help, but the server I used (where there is an error)
use a IIS authentification (between client and server
Tomcat 5).

Could you help me ?

Here is my code very simple code :

protected void doPost(HttpServletRequest arg0, HttpServletResponse arg1) throws ServletException,
IOException
      {

            this.processRequest(arg0, arg1);
      }

private void processRequest(HttpServletRequest request, HttpServletResponse response) throws
ServletException, IOException
      {

            this.out = response.getWriter();
            boolean isMultipart = FileUpload.isMultipartContent(request);
            if (!isMultipart)
            {
                  this.writeOutput("non MultiPart Message");
                  return;
            }
            DiskFileUpload fileUpload = new DiskFileUpload();
            try
            {
                  List items = fileUpload.parseRequest(request);
                  this.writeOutput("OK");
            }
            catch (FileUploadException e)
            {
                  this.writeOutput(e.toString());
            }
            catch (NullPointerException e)
            {
                  this.writeOutput(e.toString());
            }
      }

The exception seems to be catched at this line : List items = fileUpload.parseRequest(request);




     CONFIDENTIALITE : Ce message et les éventuelles pièces attachées sont
     confidentiels. Si vous n'êtes pas dans la liste des destinataires,
     veuillez informer l'expéditeur immédiatement et ne pas divulguer le
     contenu à une tierce personne, ne pas l'utiliser pour quelque raison
     que ce soit, ne pas stocker ou copier l'information qu'il contient sur
     un quelconque support.

     CONFIDENTIALITY : This  e-mail  and  any attachments are confidential
     and may be privileged. If  you are not a named recipient, please
     notify the sender immediately and do not disclose the contents to
     another person, use it for any purpose or store or copy the
     information in any medium..


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message