Issue with multipart upload in servlet on seam

Posted by stacker on Stack Overflow See other posts from Stack Overflow or by stacker
Published on 2010-06-01T16:41:40Z Indexed on 2010/06/01 16:43 UTC
Read the original article Hit count: 347

Filed under:
|
|
|
|

I created a servlet wich works fine when deployed in a separate war file, but I intend to use it as part of a seam application.

I use commons-fileupload but the iterator (see snippet) returns false (only when included in the seam-app).

Any ideas?

protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        try {
            String action = request.getParameter( "action" );

            if ( ServletFileUpload.isMultipartContent( request ) ) {
                log.info( "MULTIPART" );
            }
            ServletFileUpload upload = new ServletFileUpload();
            FileItemIterator iter = upload.getItemIterator( request );
            // --------- hasNext() returns false, only in seam -----------
            while ( iter.hasNext() ) {
                             ......
                    }

Additional Info: I don't want to use the technique described here since the uploading client is curl.

The HttpServletRequest is wrapped by org.jboss.seam.web.IdentityRequestWrapper Using the seam

© Stack Overflow or respective owner

Related posts about java

Related posts about jboss