[jetty-dev] [jira] (JETTY-1500) form parameters from multipart request not available via request.getParameter

"Jan Bartel (JIRA)" <[email protected]>
Newsgroups gmane.comp.java.jetty.general
Message-ID <2022828694.54443.1332195063517.JavaMail.j2ee-jira@codehaus01.managed.contegix.com>
     [ https://jira.codehaus.org/browse/JETTY-1500?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jan Bartel reassigned JETTY-1500:
---------------------------------

    Assignee: Jan Bartel
    
> form parameters from multipart request not available via request.getParameter
> -----------------------------------------------------------------------------
>
>                 Key: JETTY-1500
>                 URL: https://jira.codehaus.org/browse/JETTY-1500
>             Project: Jetty
>          Issue Type: Bug
>    Affects Versions: 8.1.2
>            Reporter: Gert-Jan van de Streek
>            Assignee: Jan Bartel
>
> Simple form parameters are not available via request.getParameter:
> When using a form like:
> <form enctype="multipart/form-data" method="post">
>   <input id="simple" name="simple" type="text"/>
>   <input name="translationFile" type="file"/>
> </form>
> The parameter "simple" is not available via request.getParameter, but it is available as a multipart part.
> request.getParameter("simple") > null
> request.getPart("simple") > org.eclipse.jetty.util.MultiPartInputStream$MultiPart@5b46a7bf
> According to the spec, they should be available:
> "For parts with form-data as the Content-Disposition, but without a filename, 
> the string value of the part will also be available via the getParameter / 
> getParameterValues methods on HttpServletRequest, using the name of the 
> part."
> A workaround is to just get the part and retrieve the parameter from it:
>   String simple = IOUtils.toString(getPart("simple").getInputStream());

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.