You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geronimo.apache.org by "Lu Jiang (JIRA)" <ji...@apache.org> on 2010/05/10 08:45:48 UTC

[jira] Created: (GERONIMO-5291) Can not get multipart data sent from html form.

Can not get multipart data sent from html form.
-----------------------------------------------

                 Key: GERONIMO-5291
                 URL: https://issues.apache.org/jira/browse/GERONIMO-5291
             Project: Geronimo
          Issue Type: Bug
      Security Level: public (Regular issues)
          Components: deployment
    Affects Versions: 3.0
         Environment: OS:win xp sp2
Server:Geronimo 3.0 2010.05.06 build
JDK:1.6
            Reporter: Lu Jiang


I tried the file upload example.But it fails to output the content of the uploaded file.
After debugging this example,I found that when using getPart() of HttpServletRequest ,then  we expect to get multipart data sent from html form.
Part p = ((HttpServletRequest) request).getPart("testFile");
But actually the object p is null,the multipart data is not caught.


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (GERONIMO-5291) Can not get multipart data sent from html form.

Posted by "Ivan (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/GERONIMO-5291?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ivan closed GERONIMO-5291.
--------------------------

    Fix Version/s: 3.0
       Resolution: Invalid

Personally, I do not see a special reason that multipart must be configured before using getPart/getParts. But the spec seems to require this ...

> Can not get multipart data sent from html form.
> -----------------------------------------------
>
>                 Key: GERONIMO-5291
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-5291
>             Project: Geronimo
>          Issue Type: Bug
>      Security Level: public(Regular issues) 
>          Components: deployment
>    Affects Versions: 3.0
>         Environment: OS:win xp sp2
> Server:Geronimo 3.0 2010.05.06 build
> JDK:1.6
>            Reporter: Lu Jiang
>            Assignee: Ivan
>             Fix For: 3.0
>
>
> I tried the file upload example.But it fails to output the content of the uploaded file.
> After debugging this example,I found that when using getPart() of HttpServletRequest ,then  we expect to get multipart data sent from html form.
> Part p = ((HttpServletRequest) request).getPart("testFile");
> But actually the object p is null,the multipart data is not caught.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (GERONIMO-5291) Can not get multipart data sent from html form.

Posted by "Ivan (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/GERONIMO-5291?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ivan reassigned GERONIMO-5291:
------------------------------

    Assignee: Ivan

> Can not get multipart data sent from html form.
> -----------------------------------------------
>
>                 Key: GERONIMO-5291
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-5291
>             Project: Geronimo
>          Issue Type: Bug
>      Security Level: public(Regular issues) 
>          Components: deployment
>    Affects Versions: 3.0
>         Environment: OS:win xp sp2
> Server:Geronimo 3.0 2010.05.06 build
> JDK:1.6
>            Reporter: Lu Jiang
>            Assignee: Ivan
>
> I tried the file upload example.But it fails to output the content of the uploaded file.
> After debugging this example,I found that when using getPart() of HttpServletRequest ,then  we expect to get multipart data sent from html form.
> Part p = ((HttpServletRequest) request).getPart("testFile");
> But actually the object p is null,the multipart data is not caught.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (GERONIMO-5291) Can not get multipart data sent from html form.

Posted by "Rick McGuire (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/GERONIMO-5291?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rick McGuire updated GERONIMO-5291:
-----------------------------------

    Fix Version/s: 3.0-M1
                       (was: 3.0)

> Can not get multipart data sent from html form.
> -----------------------------------------------
>
>                 Key: GERONIMO-5291
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-5291
>             Project: Geronimo
>          Issue Type: Bug
>      Security Level: public(Regular issues) 
>          Components: deployment
>    Affects Versions: 3.0
>         Environment: OS:win xp sp2
> Server:Geronimo 3.0 2010.05.06 build
> JDK:1.6
>            Reporter: Lu Jiang
>            Assignee: Ivan
>             Fix For: 3.0-M1
>
>
> I tried the file upload example.But it fails to output the content of the uploaded file.
> After debugging this example,I found that when using getPart() of HttpServletRequest ,then  we expect to get multipart data sent from html form.
> Part p = ((HttpServletRequest) request).getPart("testFile");
> But actually the object p is null,the multipart data is not caught.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (GERONIMO-5291) Can not get multipart data sent from html form.

Posted by "Ivan (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/GERONIMO-5291?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12866435#action_12866435 ] 

Ivan commented on GERONIMO-5291:
--------------------------------

I checked the spec for file uploading support in Servlet 3.0, please refer to the text below :
--->
File upload
If a request is of type multipart/form-data and if the servlet handling the 
request is annotated using the @MultipartConfig as defined in Section 8.1.5, 
"@MultipartConfig" on page 8-64, the HttpServletRequest can make available 
the various parts of the multipart request via the following methods
■ public Collection<Part> getParts()
■ public Part getPart(String name).
<---
--->
@MultipartConfig
This annotation, when specified on a Servlet, indicates that the request it expects 
is of type mime/multipart. The HttpServletRequest object of the 
corresponding servlet MUST make available the mime attachments via the 
getParts and getPart methods to iterate over the various mime attachments.
<---
>From my understanding, the two methods are expected to invoke in the Servlet, also, those two methods should be avaible when both the conditions are fullfilled :
a. multipart/form-data
b. MultipartConfig is configued
Seems that Tomcat strictly actions accroding to the spec.  I also check the Jetty's implementation, it seems that Jetty is more tolerant, it might make the getPart/getParts avaible when the mutlpart form data is detected.
Please correct me if I misundstand anything !

> Can not get multipart data sent from html form.
> -----------------------------------------------
>
>                 Key: GERONIMO-5291
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-5291
>             Project: Geronimo
>          Issue Type: Bug
>      Security Level: public(Regular issues) 
>          Components: deployment
>    Affects Versions: 3.0
>         Environment: OS:win xp sp2
> Server:Geronimo 3.0 2010.05.06 build
> JDK:1.6
>            Reporter: Lu Jiang
>            Assignee: Ivan
>
> I tried the file upload example.But it fails to output the content of the uploaded file.
> After debugging this example,I found that when using getPart() of HttpServletRequest ,then  we expect to get multipart data sent from html form.
> Part p = ((HttpServletRequest) request).getPart("testFile");
> But actually the object p is null,the multipart data is not caught.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.