Yes it should be enough.
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




---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to