You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Spec Dev (JIRA)" <ji...@apache.org> on 2008/01/30 03:56:04 UTC

[jira] Created: (WW-2464) Multipart request parameters not copied into parameterMap

Multipart request parameters not copied into parameterMap
---------------------------------------------------------

                 Key: WW-2464
                 URL: https://issues.apache.org/struts/browse/WW-2464
             Project: Struts 2
          Issue Type: Bug
          Components: Core Actions
    Affects Versions: 2.0.11
         Environment: Windows XP - Tomcat 6
            Reporter: Spec Dev


Multipart request parameters aren't being copied into the parameterMap.
Hence, doing HttpServletRequest.getParameter("xxx") return null for all multipart parameters.

A org.apache.struts2.dispatcher.StrutsRequestWrapper is passed when a GET or POST action is executed.
However,  a org.apache.struts2.dispatcher.multipart.MultiPartRequestWrapper is used for "multipart/form-data" POST actions.

The org.apache.struts2.dispatcher.multipart.MultiPartRequestWrapper has an attribute of type org.apache.struts2.dispatcher.multipart.JakartaMultiPartRequest which in turn maintains a HashMap attribute named "params".
"params" contains the multipart request parameters and those parameter are never copied into the parameterMap.

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


[jira] Updated: (WW-2464) Multipart request parameters not copied into parameterMap

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

Spec Dev updated WW-2464:
-------------------------

    Attachment: multipart post.PNG

Please see the attached screenshot.

> Multipart request parameters not copied into parameterMap
> ---------------------------------------------------------
>
>                 Key: WW-2464
>                 URL: https://issues.apache.org/struts/browse/WW-2464
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Core Actions
>    Affects Versions: 2.0.11
>         Environment: Windows XP - Tomcat 6
>            Reporter: Spec Dev
>         Attachments: multipart post.PNG
>
>
> Multipart request parameters aren't being copied into the parameterMap.
> Hence, doing HttpServletRequest.getParameter("xxx") return null for all multipart parameters.
> A org.apache.struts2.dispatcher.StrutsRequestWrapper is passed when a GET or POST action is executed.
> However,  a org.apache.struts2.dispatcher.multipart.MultiPartRequestWrapper is used for "multipart/form-data" POST actions.
> The org.apache.struts2.dispatcher.multipart.MultiPartRequestWrapper has an attribute of type org.apache.struts2.dispatcher.multipart.JakartaMultiPartRequest which in turn maintains a HashMap attribute named "params".
> "params" contains the multipart request parameters and those parameter are never copied into the parameterMap.

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


[jira] Resolved: (WW-2464) Multipart request parameters not copied into parameterMap

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

Don Brown resolved WW-2464.
---------------------------

    Resolution: Fixed
      Assignee: Don Brown

This works correctly in 2.1.3-SNAPSHOT.  I tested accessing the parameter via the ActionContext and HttpServletRequest methods.

> Multipart request parameters not copied into parameterMap
> ---------------------------------------------------------
>
>                 Key: WW-2464
>                 URL: https://issues.apache.org/struts/browse/WW-2464
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Core Actions
>    Affects Versions: 2.0.11
>         Environment: Windows XP - Tomcat 6
>            Reporter: Spec Dev
>            Assignee: Don Brown
>             Fix For: 2.1.3
>
>         Attachments: multipart post.PNG
>
>
> Multipart request parameters aren't being copied into the parameterMap.
> Hence, doing HttpServletRequest.getParameter("xxx") return null for all multipart parameters.
> A org.apache.struts2.dispatcher.StrutsRequestWrapper is passed when a GET or POST action is executed.
> However,  a org.apache.struts2.dispatcher.multipart.MultiPartRequestWrapper is used for "multipart/form-data" POST actions.
> The org.apache.struts2.dispatcher.multipart.MultiPartRequestWrapper has an attribute of type org.apache.struts2.dispatcher.multipart.JakartaMultiPartRequest which in turn maintains a HashMap attribute named "params".
> "params" contains the multipart request parameters and those parameter are never copied into the parameterMap.

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


[jira] Issue Comment Edited: (WW-2464) Multipart request parameters not copied into parameterMap

Posted by "Spec Dev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/struts/browse/WW-2464?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=44327#action_44327 ] 

specdev edited comment on WW-2464 at 7/4/08 12:32 AM:
-------------------------------------------------------

Here is my action stack configuration:

           <interceptor-stack name="basicStack">
                <interceptor-ref name="servletConfig"/>
                <interceptor-ref name="authenticator"/>
            </interceptor-stack>

            <interceptor-stack name="formStack">
                <interceptor-ref name="basicStack"/>
                <interceptor-ref name="params"/>
                <interceptor-ref name="workflow"/>
            </interceptor-stack>

            <interceptor-stack name="uploadStack">
                <interceptor-ref name="basicStack"/>
                <interceptor-ref name="fileUpload"/>
                <interceptor-ref name="params"/>
                <interceptor-ref name="workflow"/>
            </interceptor-stack>

      was (Author: specdev):
    Here is my action stack configuration:

       <interceptor-stack name="formStack">
                <interceptor-ref name="servletConfig"/>
                <interceptor-ref name="authenticator"/>
                <interceptor-ref name="params"/>
                <interceptor-ref name="workflow"/>
            </interceptor-stack>
  
> Multipart request parameters not copied into parameterMap
> ---------------------------------------------------------
>
>                 Key: WW-2464
>                 URL: https://issues.apache.org/struts/browse/WW-2464
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Core Actions
>    Affects Versions: 2.0.11
>         Environment: Windows XP - Tomcat 6
>            Reporter: Spec Dev
>             Fix For: 2.1.3
>
>         Attachments: multipart post.PNG
>
>
> Multipart request parameters aren't being copied into the parameterMap.
> Hence, doing HttpServletRequest.getParameter("xxx") return null for all multipart parameters.
> A org.apache.struts2.dispatcher.StrutsRequestWrapper is passed when a GET or POST action is executed.
> However,  a org.apache.struts2.dispatcher.multipart.MultiPartRequestWrapper is used for "multipart/form-data" POST actions.
> The org.apache.struts2.dispatcher.multipart.MultiPartRequestWrapper has an attribute of type org.apache.struts2.dispatcher.multipart.JakartaMultiPartRequest which in turn maintains a HashMap attribute named "params".
> "params" contains the multipart request parameters and those parameter are never copied into the parameterMap.

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


[jira] Updated: (WW-2464) Multipart request parameters not copied into parameterMap

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

Don Brown updated WW-2464:
--------------------------

    Fix Version/s: 2.1.3

> Multipart request parameters not copied into parameterMap
> ---------------------------------------------------------
>
>                 Key: WW-2464
>                 URL: https://issues.apache.org/struts/browse/WW-2464
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Core Actions
>    Affects Versions: 2.0.11
>         Environment: Windows XP - Tomcat 6
>            Reporter: Spec Dev
>             Fix For: 2.1.3
>
>         Attachments: multipart post.PNG
>
>
> Multipart request parameters aren't being copied into the parameterMap.
> Hence, doing HttpServletRequest.getParameter("xxx") return null for all multipart parameters.
> A org.apache.struts2.dispatcher.StrutsRequestWrapper is passed when a GET or POST action is executed.
> However,  a org.apache.struts2.dispatcher.multipart.MultiPartRequestWrapper is used for "multipart/form-data" POST actions.
> The org.apache.struts2.dispatcher.multipart.MultiPartRequestWrapper has an attribute of type org.apache.struts2.dispatcher.multipart.JakartaMultiPartRequest which in turn maintains a HashMap attribute named "params".
> "params" contains the multipart request parameters and those parameter are never copied into the parameterMap.

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


[jira] Updated: (WW-2464) Multipart request parameters not copied into parameterMap

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

Spec Dev updated WW-2464:
-------------------------


Here is my action stack configuration:

       <interceptor-stack name="formStack">
                <interceptor-ref name="servletConfig"/>
                <interceptor-ref name="authenticator"/>
                <interceptor-ref name="params"/>
                <interceptor-ref name="workflow"/>
            </interceptor-stack>

> Multipart request parameters not copied into parameterMap
> ---------------------------------------------------------
>
>                 Key: WW-2464
>                 URL: https://issues.apache.org/struts/browse/WW-2464
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Core Actions
>    Affects Versions: 2.0.11
>         Environment: Windows XP - Tomcat 6
>            Reporter: Spec Dev
>             Fix For: 2.1.3
>
>         Attachments: multipart post.PNG
>
>
> Multipart request parameters aren't being copied into the parameterMap.
> Hence, doing HttpServletRequest.getParameter("xxx") return null for all multipart parameters.
> A org.apache.struts2.dispatcher.StrutsRequestWrapper is passed when a GET or POST action is executed.
> However,  a org.apache.struts2.dispatcher.multipart.MultiPartRequestWrapper is used for "multipart/form-data" POST actions.
> The org.apache.struts2.dispatcher.multipart.MultiPartRequestWrapper has an attribute of type org.apache.struts2.dispatcher.multipart.JakartaMultiPartRequest which in turn maintains a HashMap attribute named "params".
> "params" contains the multipart request parameters and those parameter are never copied into the parameterMap.

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


[jira] Commented: (WW-2464) Multipart request parameters not copied into parameterMap

Posted by "Wes Wannemacher (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/struts/browse/WW-2464?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=44309#action_44309 ] 

Wes Wannemacher commented on WW-2464:
-------------------------------------

If my understanding is correct, you need to add the "params" interceptor to get the request parameters copied to the parameterMap. I could be wrong though, I didn't look thoroughly through the code. But, fileUploadStack does not call the "params" interceptor. Can you post your action configuration (struts.xml)?

> Multipart request parameters not copied into parameterMap
> ---------------------------------------------------------
>
>                 Key: WW-2464
>                 URL: https://issues.apache.org/struts/browse/WW-2464
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Core Actions
>    Affects Versions: 2.0.11
>         Environment: Windows XP - Tomcat 6
>            Reporter: Spec Dev
>             Fix For: 2.1.3
>
>         Attachments: multipart post.PNG
>
>
> Multipart request parameters aren't being copied into the parameterMap.
> Hence, doing HttpServletRequest.getParameter("xxx") return null for all multipart parameters.
> A org.apache.struts2.dispatcher.StrutsRequestWrapper is passed when a GET or POST action is executed.
> However,  a org.apache.struts2.dispatcher.multipart.MultiPartRequestWrapper is used for "multipart/form-data" POST actions.
> The org.apache.struts2.dispatcher.multipart.MultiPartRequestWrapper has an attribute of type org.apache.struts2.dispatcher.multipart.JakartaMultiPartRequest which in turn maintains a HashMap attribute named "params".
> "params" contains the multipart request parameters and those parameter are never copied into the parameterMap.

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