Hi,

As Andrea explained (and the ticket you mentioned yourself) the change
in MyApp#newWebRequest caused several problems, so better do not do it
there.
Move the code that creates the MultipartWebRequest in your own IResource impl.

On Wed, Oct 31, 2012 at 1:55 PM, heapifyman <heapify...@gmail.com> wrote:
> Hello,
> after a second closer look I figured I should override newWebRequest in
> my WicketApplication extends WebApplication, right?
> So now I have:
> @Override
> public WebRequest newWebRequest(HttpServletRequest servletRequest,
> String filterPath) {
> WebRequest webRequest = super.newWebRequest(servletRequest, filterPath);
>
> String contentType = servletRequest.getContentType();
> String method = servletRequest.getMethod();
> if (webRequest instanceof ServletWebRequest
> && Form.METHOD_POST.equalsIgnoreCase(method)
> && Strings.isEmpty(contentType) == false
> && contentType.toLowerCase().startsWith(
> Form.ENCTYPE_MULTIPART_FORM_DATA)) {
> try {
> return ((ServletWebRequest) webRequest).newMultipartWebRequest(
> getApplicationSettings().getDefaultMaximumUploadSize(),
> "externalForm");
> } catch (FileUploadException e) {
> throw new RuntimeException(e);
>
> }
> }
>
> return webRequest;
> }
>
> That seems to work. Am I still missing something?
> Thanks
>
>
> 2012/10/31 Andrea Del Bene <an.delb...@gmail.com>
>
>> Hi,
>>
>> the change introduced by WICKET-4752 caused some other problems so it was
>> reverted in 6.2.0. If you want to obtain the old behavior you should use in
>> our application class  the code that has been removed from WebApplication
>> class (see the diff indicated by Martin)
>>
>>  Sorry, could you elaborate a bit on that? I don't see the connection... :(
>>>
>>>
>>> 2012/10/31 Martin Grigorov <mgrigo...@apache.org>
>>>
>>>  https://git-wip-us.apache.org/**repos/asf/wicket/repo?p=**
>>>> wicket.git;a=commitdiff;h=**3355b5af68a238855a602f5161980d**65024a1e92<https://git-wip-us.apache.org/repos/asf/wicket/repo?p=wicket.git;a=commitdiff;h=3355b5af68a238855a602f5161980d65024a1e92>
>>>>
>>>> On Wed, Oct 31, 2012 at 12:49 PM, heapifyman <heapify...@gmail.com>
>>>> wrote:
>>>>
>>>>> Hello,
>>>>>
>>>>> Just updated from 6.1.1 to 6.2.0 and now I'm having a problem with file
>>>>> uploads.
>>>>> I have a
>>>>>    public class FileUploadRequestHandler implements IRequestHandler
>>>>> that handles jquery fileupload requests.
>>>>>
>>>>> In its respond() method I call
>>>>>    Request request = requestCycle.getRequest();
>>>>> which in wicket 6.1.1 would give me a MultipartServletWebRequestImpl
>>>>> with
>>>>> parameters and postparameters filled and, of course, the files to
>>>>> upload.
>>>>>
>>>>> In 6.2.0 I only get a ServletWebRequest and the postparameters are
>>>>> empty.
>>>>>
>>>>> I guess this is due to WICKET-4752 but I am at a complete loss how to
>>>>> get
>>>>> back the old behavior.
>>>>>
>>>>> Any hints would be appreciated.
>>>>> Thanks
>>>>>
>>>>
>>>>
>>>> --
>>>> Martin Grigorov
>>>> jWeekend
>>>> Training, Consulting, Development
>>>> http://jWeekend.com
>>>>
>>>> ------------------------------**------------------------------**
>>>> ---------
>>>> To unsubscribe, e-mail: 
>>>> users-unsubscribe@wicket.**apache.org<users-unsubscr...@wicket.apache.org>
>>>> For additional commands, e-mail: users-h...@wicket.apache.org
>>>>
>>>>
>>>>
>>
>> ------------------------------**------------------------------**---------
>> To unsubscribe, e-mail: 
>> users-unsubscribe@wicket.**apache.org<users-unsubscr...@wicket.apache.org>
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to