I think there's a bug with class WebApplication which doesn't create a
MultipartServletWebRequestImpl when the original request is multipart.
In the meantime a possible workaround is to override method
newWebRequest of your application class and put the following code
inside it:
{
ServletWebRequest newWebRequest = new
ServletWebRequest(servletRequest, filterPath);
String contentType = servletRequest.getContentType();
if (!Strings.isEmpty(contentType) &&
contentType.toLowerCase().contains("multipart/form-data"))
{
try
{
return newWebRequest.newMultipartWebRequest(
getApplicationSettings().getDefaultMaximumUploadSize(), "externalForm");
}
catch (FileUploadException e)
{
throw new RuntimeException(e);
}
}
return newWebRequest;
}
this should solve your problem with post parameters.
Thanks for your replies:
This is my plain html code:
<form action="/upload" method="POST" enctype="multipart/form-data">
<input type="text" name="id"/>
<br/>
<input type="file" name="file"/>
<br/>
<input type="submit" value="ab dafür"/>
</form>
This is my Wicket class:
public class UploadPage extends WebPage {
final Logger LOG = LoggerFactory.getLogger(getClass());
public UploadPage() {
for(String str :
getRequest().getRequestParameters().getParameterNames()){
LOG.debug("==> " + str);
}
}
}
I cannot read a single param.
Pls. keep in mind:
The form is NO wicket form as I try to simulate an external access to my
page.
Thanks for your help
--
View this message in context:
http://apache-wicket.1842946.n4.nabble.com/Read-POST-based-request-from-external-site-tp4651269p4651279.html
Sent from the Users forum mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org