Issue with multipart upload in servlet on seam
- by stacker
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