You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Martin Grigorov (JIRA)" <ji...@apache.org> on 2015/02/20 21:15:12 UTC

[jira] [Resolved] (WICKET-5839) ServletWebRequest Post Parameters missing

     [ https://issues.apache.org/jira/browse/WICKET-5839?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martin Grigorov resolved WICKET-5839.
-------------------------------------
    Resolution: Not a Problem

> ServletWebRequest Post Parameters missing
> -----------------------------------------
>
>                 Key: WICKET-5839
>                 URL: https://issues.apache.org/jira/browse/WICKET-5839
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 6.18.0, 6.19.0
>            Reporter: Bryan Holladay
>
> To Reproduce:
> I was able to easily reproduce it with the simplest submit button: https://github.com/baholladay/wicketrequesterror
> All you need to do is click submit and you'll see the parameter value. Then change the wicket version from 6.16.0 to 6.19.0 and rebuild and click submit and you'll see no value after clicking submit.
> Description: 
> I'm trying to upgrade to 6.19.0 from 6.16.0 and one of my rest endpoints doesn't have access to the post parameters anymore.
> I mount a specific endpoint to a page:
> Application.java
> mountPage("/fileUpload", FileUploadRest.class);
> and then look for the parameters in the page
> FileUploadRest extends WebPage{
> public FileUploadRest(){
>   final ServletWebRequest webRequest = (ServletWebRequest) getRequest();
>   MultipartServletWebRequest multiPartRequest = webRequest.newMultipartWebRequest(Bytes.megabytes(100), "ignored");
> String uuid = multiPartRequest.getRequestParameters().getParameterValue("uuid").toString();
> ...
> }
> This UUID parameter works fine in 6.16.0 but is always null in 6.19.0. This is true for all parameters and the file passed in. I verified that the post is sending the data (by looking at the developer Network tab in chrome).
> Request Payload:
> ------WebKitFormBoundaryttKBVItmK4S1fZNP
> Content-Disposition: form-data; name="myAwesomeDropzone_hf_0"
> ------WebKitFormBoundaryttKBVItmK4S1fZNP
> Content-Disposition: form-data; name="uuid"
> 4e238b39-478d-4938-8bc2-0416508b04c6
> ------WebKitFormBoundaryttKBVItmK4S1fZNP
> Content-Disposition: form-data; name="file"; filename="test4.pdf"
> Content-Type: application/pdf
> I've also tried using a Resource and mounting that instead of a WebPage by following the stackoverflow suggestion [1], but got the same results where no parameters were being passed through.
> [1] http://stackoverflow.com/questions/17874695/wicket-http-post-get-raw-data-from-servletrequest



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)