Since BulkImportController does not return a ModelAndView object, no HPI configured view is triggered, which means tsg_message.js is NOT included. This means the messages taht the controller is trying to display will never show up.
More importantly, since this controller is triggered with an AJAX call, it's up to the bulkImport.jsp code to handle errors and prompt the user as necessary.
The success handler is always triggered, even if BulkImportController throws an uncaught exception, it should just trigger the error page to be returned in the response body.
The bulkImport.jsp should inspect the object in the success handler, after it calls bulkImport.htm.
If the object's response has an invalid response code, it should display the response body.
Else, handle the success like before.
The Bulk Import Controller should write errors to the response body, and set the status code appropriately.
BulkImport controller should have its code in a try/catch that will catch the HPIRuntimeException that is thrown by a failure in DocumentService.createDocument
this catch should log the error and send an error code on the response.
this will cause the callback function in bulkImport.jsp to hit its "failure" function, where we can put logic for displaying the error. currently the "failure" function does nothing