1

Similar to Oracle's MultipartConfig example, I call request.getParameter() prior to calling request.getPart.

This works fine except for when the size of the file exceeds the maxFileSize specified by MultipartConfig.

When this is the case, request.getParameter returns null.

Is this the intended result? I have to first check that getPart() doesn't throw an IllegalStateException and only then retrieve regular (text) parameter values?

theyuv
  • 1,556
  • 4
  • 26
  • 55

1 Answers1

0

Explained in this link that this is the expected behavior:

http://www.ryanchapin.com/fv-b-4-666/Invocation-of-request-getParts---in-a-Servlet-3-0-doPost-Method-Will-Not-Throw-IllegalStateException.html

theyuv
  • 1,556
  • 4
  • 26
  • 55