File Uploading (CSV, Aiken, XML) - 1610oct24java/AssociateEvaluationSystem GitHub Wiki

Important Server Attribute

In order for the File uploading portion to work, one must add the attribute allowCasualMultipartParsing="true" into the the Tomcat "context.xml" file. This attribute MUST be attached to the <context> tag in "Servers/Tomcat/context.xml".

Failure to add this attribute will lead to a 500 error with the following exceptions thrown:

  • org.springframework.web.multipart.MultipartException: Could not parse multipart servlet request
  • java.lang.IllegalStateException: Unable to process parts as no multi-part configuration has been provided

XML Best Practices

This XML parser works with LMS output of XML files. Integrating the XML parser into a page consist of adding the Script tag for xmlparser.js and using the extractXml and createQuestions functions.

  • The extractXml() - parse through the xml document and should be run before the createQuestions function. It can pull questions that are multiple choice or multiple select. It was tested to set the category of Java, C#, and Data Structures.
  • The createdQuestions() - sends a list of question objects to the questions rest controller to be saved to the database.
⚠️ **GitHub.com Fallback** ⚠️