A servlet receives form data with both text and file inputs. Identify the correct approach to parse this data.

  • Convert the data to JSON and parse it
  • Parse the data manually using String methods
  • Use a library like Apache Commons FileUpload
  • Use the built-in Java Scanner class
The correct approach is to use a library like Apache Commons FileUpload, which is designed to handle form data with both text and file inputs efficiently and reliably.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *