Hi,

I have a panel with a FileUpload widget. It works fine in hosted mode,
Internet Explorer and Mozilla, but not in Chrome. In Chrome, it looks
slightly different, and the upload fails at the server end. In the
others, the upload works just fine.


In the other browsers (ie not Chrome), the panel shows a box, in which
the filename appears after I have selected it from the filesystem.
Next to that there is a button, labelled 'BROWSE'. Under that is the
submit button.

In Chrome, there is a label, which says 'Choose File' and next to
that, it says 'No file chosen'. So there isn't the usual box.
Underneath that is again the submit button. I can choose a file in
Chrome in the usual way (by pressing Choose File), but then if I
submit it, the upload fails on the server end, with the following
error:


org.apache.commons.fileupload.FileUploadException: Processing of
multipart/form-
data request failed. Connection reset
        at org.apache.commons.fileupload.FileUploadBase.parseRequest
(FileUploadB
ase.java:384)
        at
org.apache.commons.fileupload.servlet.ServletFileUpload.parseRequest(
ServletFileUpload.java:116)
        at ac.otago.flags.server.FileUploadServlet.doPost
(FileUploadServlet.java
:74)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:
710)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:
803)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:290)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter
(ApplicationF
ilterChain.java:206)


My DoPost method in the upload servlet looks like this (as far as it
gets)

protected void doPost(HttpServletRequest request,
                        HttpServletResponse response) throws ServletException, 
IOException
{

                try {
                        ServletRequestContext ctx = new 
ServletRequestContext(request);

                        if (ServletFileUpload.isMultipartContent(ctx) == false) 
{
                                sendResponse(response, new FormResponse(
                                                
HttpServletResponse.SC_INTERNAL_SERVER_ERROR,
                                                "The servlet can only handle 
multipart requests."
                                                                + " This is 
probably a software bug."));
                                return;
                        }

                        // Create a new file upload handler
                        ServletFileUpload upload = new ServletFileUpload(
                                        new DiskFileItemFactory());

                        // Parse the request
                        List<FileItem> items = upload.parseRequest(request);


And this final line throws the exception. (It's line 74)


I have posted this question on apache commons forum, but go no
response.


Why would this happen in Chrome, or how can I proceed to solve this
problem?


Thank you for your help,


Michel

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to