Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 8.1.2
-
Fix Version/s: 8.1.3
-
Component/s: None
-
Labels:None
-
Number of attachments :
Description
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());
Thanks, fixed for 8.1.3
Jan